Vector Positioning at Intermission

Locked
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Vector Positioning at Intermission

Post by nexus024 »

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?
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: Vector Positioning at Intermission

Post by nexus024 »

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?! :)
User avatar
Eraser
Posts: 19175
Joined: Fri Dec 01, 2000 8:00 am

Re: Vector Positioning at Intermission

Post by Eraser »

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.
3xistence
Posts: 90
Joined: Sun May 13, 2012 3:02 pm

Re: Vector Positioning at Intermission

Post by 3xistence »

mhmmm this sounds interesting
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: Vector Positioning at Intermission

Post by nexus024 »

Still no dice on getting this to work. :(
nexus024
Posts: 148
Joined: Fri Oct 06, 2006 7:26 pm

Re: Vector Positioning at Intermission

Post by nexus024 »

Are you sure that not down the line somewhere the player position is reset due to the PM_INTERMISSION pmove type?
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....
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Vector Positioning at Intermission

Post by UglyFoot »

Could you show the code? I think it has something to do with the way you did the periodic call to MoveClientToIntermission().
UglyFoot
Posts: 139
Joined: Fri Jul 22, 2011 12:35 pm

Re: Vector Positioning at Intermission

Post by UglyFoot »

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.
Locked