Quake3World.com Forums
     Programming Discussion
        Vector Positioning at Intermission


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Vector Positioning at Intermission

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 06-09-2013 12:13 PM           Profile Send private message  E-mail  Edit post Reply with quote


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?




Top
                 

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 06-12-2013 10:55 AM           Profile Send private message  E-mail  Edit post Reply with quote


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?! :)




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
PostPosted: 06-13-2013 10:02 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Warrior
Warrior
Joined: 13 May 2012
Posts: 90
PostPosted: 06-21-2013 01:14 PM           Profile Send private message  E-mail  Edit post Reply with quote


mhmmm this sounds interesting




Top
                 

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 03-20-2014 11:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


Still no dice on getting this to work. :(




Top
                 

Commander
Commander
Joined: 06 Oct 2006
Posts: 148
PostPosted: 03-20-2014 03:37 PM           Profile Send private message  E-mail  Edit post Reply with quote


Quote:
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....




Top
                 

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 03-21-2014 11:55 AM           Profile Send private message  E-mail  Edit post Reply with quote


Could you show the code? I think it has something to do with the way you did the periodic call to MoveClientToIntermission().




Top
                 

Commander
Commander
Joined: 22 Jul 2011
Posts: 139
PostPosted: 03-22-2014 05:41 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.