Forum

problems in q3bsp

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Re: problems in q3bsp

Postby LordHavoc » Thu May 08, 2014 4:53 am

self.oldorigin is used by all quake engines in case the player is stuck, it teleports them back to that location, if they aren't stuck it updates it to match their .origin, so they basically get stuck on something rather than getting embedded in it when the physics breaks, it's a better behavior.

A side effect is that if you have a info_teleport_destination or info_player_deathmatch that is slightly in solid, the teleport (or spawn in) will teleport them back to their self.origin before the event in question, because the new position is "bad".

As a rule of thumb I usually assign self.oldorigin = self.origin after teleporting or spawning a player, so that it will try to unstick them in other ways rather than sending them back to where they died or whatever.

I've posted a new darkplaces build just now which should improve collisions significantly on slopes and such.
LordHavoc
 
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA

Re: problems in q3bsp

Postby Cobalt » Thu May 08, 2014 2:36 pm

Interesting. With the advent of tracebox, like Spike says, can be used to verify the location is not in a solid before the player spawns there. If its ok, spawn there, set that origin as oldorigin. Also as a plan "b", I assign a .ent marking it as the players last known good spawn position

I will have to check out the new release later.....



LordHavoc wrote:self.oldorigin is used by all quake engines in case the player is stuck, it teleports them back to that location, if they aren't stuck it updates it to match their .origin, so they basically get stuck on something rather than getting embedded in it when the physics breaks, it's a better behavior.

A side effect is that if you have a info_teleport_destination or info_player_deathmatch that is slightly in solid, the teleport (or spawn in) will teleport them back to their self.origin before the event in question, because the new position is "bad".

As a rule of thumb I usually assign self.oldorigin = self.origin after teleporting or spawning a player, so that it will try to unstick them in other ways rather than sending them back to where they died or whatever.

I've posted a new darkplaces build just now which should improve collisions significantly on slopes and such.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: problems in q3bsp

Postby LordHavoc » Thu May 08, 2014 3:25 pm

I was actually noting that you can assign self.origin = self.origin; after doing the setorigin when spawning the player, and it will trigger the engine's internal logic for moving the player out of small obstructions.
LordHavoc
 
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA

Re: problems in q3bsp

Postby frag.machine » Thu May 08, 2014 4:37 pm

So, self.origin = self.origin triggers the "unstuck entity" code ? Neat trick, I'll add this to my code. Thanks for the tip.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Re: problems in q3bsp

Postby Cobalt » Fri May 09, 2014 6:07 pm

Dont you mean:

self.oldorigin = self.origin ; // ?

Im guessing the Q3bsp tree greatly reduces or eliminates this from happening? Where the player winds up in a solid for some reason....compared to normal BSP that is.

LordHavoc wrote:I was actually noting that you can assign self.origin = self.origin; after doing the setorigin when spawning the player, and it will trigger the engine's internal logic for moving the player out of small obstructions.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: problems in q3bsp

Postby LordHavoc » Fri May 09, 2014 7:48 pm

Yes I meant self.oldorigin = self.origin;

q3bsp does not improve or worsen the situation - I am referring to map bugs here, where someone put a info_player_deathmatch a little bit too close to some piece of geometry and the player spawn position is thus invalid (partially in solid), the engine can attempt to fixup this position, but it won't even try if the self.oldorigin is not in solid as well.
LordHavoc
 
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest