Random Spawn point
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
Random Spawn point
entity () SelectSpawnPoint
Ok this routine is old as dirt, but even through its many versions
i still find players respawning at the location where they DIED!
Are they respawning too fast? or is the random-ness fubarded.
I thought it was because all the spawnlocations were occupied or in range of nearby players thus forcing a skip in the itteration....
but it happens during 1 on 1 games! :< Any one really know why this happens? That is, the fact that you, periodically respawn where u died?
Ok this routine is old as dirt, but even through its many versions
i still find players respawning at the location where they DIED!
Are they respawning too fast? or is the random-ness fubarded.
I thought it was because all the spawnlocations were occupied or in range of nearby players thus forcing a skip in the itteration....
but it happens during 1 on 1 games! :< Any one really know why this happens? That is, the fact that you, periodically respawn where u died?
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Yes, I've had a nasty problem with it. The fix appears to be to set self.oldorigin to self.origin so the engine won't panic and reset to where they were before. In fact you can do this:
and rename setorigin in defs.qc to real_setorigin.
I once tried to do the random spawn points thing a long time ago but gave up very angrily because of this problem. If only I'd known...
- Code: Select all
void(entity e, vector org) setorigin =
{
real_setorigin(e, org);
if(e.movetype == MOVETYPE_WALK)
e.oldorigin = e.origin;
};
and rename setorigin in defs.qc to real_setorigin.
I once tried to do the random spawn points thing a long time ago but gave up very angrily because of this problem. If only I'd known...
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
ok just a follow up on this for completeness.
The occurance of respawning at death spot is reduced if you set self.movetype = MOVETYPE_WALK in PutClientInServer --
AFTER you set the player's origin. The player becomes MOVETYPE_TOSS when s/he dies (thru playerdie in player.qc)
Waz~ suggests 0.05 seconds later, but at the bottom of the routine works for me (so far..)
______________________________________________
Someday, we will all just get together, drink some beer and
make the best damn quake mod we can! (drunk)
The occurance of respawning at death spot is reduced if you set self.movetype = MOVETYPE_WALK in PutClientInServer --
AFTER you set the player's origin. The player becomes MOVETYPE_TOSS when s/he dies (thru playerdie in player.qc)
Waz~ suggests 0.05 seconds later, but at the bottom of the routine works for me (so far..)
______________________________________________
Someday, we will all just get together, drink some beer and
make the best damn quake mod we can! (drunk)
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
