Inside3D!
     

Random Spawn point

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Tue Feb 08, 2005 8:53 am    Post subject: Random Spawn point Reply with quote

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?
Back to top
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Tue Feb 08, 2005 10:55 am    Post subject: Reply with quote

What engine(s) were used? The reason that would happen is if the new location is blocked... DP reportedly does this even if the location isn't blocked sometimes...
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Tue Feb 08, 2005 4:43 pm    Post subject: Reply with quote

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:
Code:

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... Confused
_________________
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.
Back to top
View user's profile Send private message MSN Messenger
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Sat Feb 12, 2005 6:31 am    Post subject: Reply with quote

Excellent! Works like a champ thanks!
Back to top
View user's profile Send private message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Sun Jun 12, 2005 2:41 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Sun Jun 12, 2005 6:08 am    Post subject: Reply with quote

Hmmm.. That's interesting. I'll try that, thanks!
_________________
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.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group