Vector Positioning at Intermission
Vector Positioning at Intermission
Usually at the end of a map everyone is moved to the intermission at a specific location in the map. I am trying to code my mod to rotate all players at the intermission to various spots within the map. It works initially once BeginIntermission() is called which in turn calls my modified version of MoveClientToIntermission() that basically alters the x,y,z coordinates assigned to client->ps.origin and client->ps.viewangles. Now, in CheckIntermissionExit() I periodically call that modified function again for all clients to "move" them to the new position within the map, however the players are not moved. They are seemingly stuck at the first spot they are moved to right as the intermission began. So it seems there is something with the intermission period that is preventing this from happening. Anyone know why this isn't working?
Re: Vector Positioning at Intermission
I am thinking it has something to do with the pm_type being set to PM_INTERMISSION...
game/bg_public.h: PM_INTERMISSION, // no movement or status bar
I have tried setting the players pm_type back to PM_SPECTATOR right before the vector re-positioning and then back to PM_INTERMISSION once done, however this made no difference. It seems like it probably has something to do with this though but I have yet to figure it out.
Where is Misantropia when you need him?!
game/bg_public.h: PM_INTERMISSION, // no movement or status bar
I have tried setting the players pm_type back to PM_SPECTATOR right before the vector re-positioning and then back to PM_INTERMISSION once done, however this made no difference. It seems like it probably has something to do with this though but I have yet to figure it out.
Where is Misantropia when you need him?!

Re: Vector Positioning at Intermission
He's been MIA for some time now.
Are you sure that not down the line somewhere the player position is reset due to the PM_INTERMISSION pmove type? Have a look at the target_cutscene entity in EntityPlus (http://code.google.com/p/entityplus). It moves the player along linear paths between two info_camera entities. Note that it's done both client and server side. I think I introduced a separate PM_CUTSCENE pmove type for it.
Are you sure that not down the line somewhere the player position is reset due to the PM_INTERMISSION pmove type? Have a look at the target_cutscene entity in EntityPlus (http://code.google.com/p/entityplus). It moves the player along linear paths between two info_camera entities. Note that it's done both client and server side. I think I introduced a separate PM_CUTSCENE pmove type for it.
Re: Vector Positioning at Intermission
mhmmm this sounds interesting
Re: Vector Positioning at Intermission
Still no dice on getting this to work. 

Re: Vector Positioning at Intermission
Yes, I have tested this. Before I attempt to move the player to the new position I set their pm_type to PM_SPECTATOR and then check the value later. It is still set to PM_SPECTATOR. It also doesn't appear to be restricted by the PM_INTERMISSION flag. I added some printf's in bg_pmove.c and it wasn't dropping the movement there. Hmmmmm....Are you sure that not down the line somewhere the player position is reset due to the PM_INTERMISSION pmove type?
Re: Vector Positioning at Intermission
Could you show the code? I think it has something to do with the way you did the periodic call to MoveClientToIntermission().
Re: Vector Positioning at Intermission
I've just done a quick test and I've found the same problem. For some reason the ps.origin of the client side isn't updated but the one of the server side does, so knowing how a player move done by the server works, like a teleportation, might help.