From 08b0b72c38ded399362685e1d1271c08eb7f4503 Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 14 Aug 2011 20:28:13 -0400 Subject: [PATCH] IT FINALLY WORKS THE WAY I WANT IT TO! Just changed the trace in testentityposition to worldonly for movetype_spectator, this way it only pushes you out of solid if you're inside the world (which is the effect I wanted for movetype_spectator) --- sv_phys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sv_phys.c b/sv_phys.c index 02539aca..6b2fa954 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -919,7 +919,7 @@ static int SV_TestEntityPosition (prvm_edict_t *ent, vec3_t offset) trace_t trace; contents = SV_GenericHitSuperContentsMask(ent); VectorAdd(PRVM_serveredictvector(ent, origin), offset, org); - trace = SV_TraceBox(org, PRVM_serveredictvector(ent, mins), PRVM_serveredictvector(ent, maxs), PRVM_serveredictvector(ent, origin), MOVE_NOMONSTERS, ent, contents); + trace = SV_TraceBox(org, PRVM_serveredictvector(ent, mins), PRVM_serveredictvector(ent, maxs), PRVM_serveredictvector(ent, origin), ((PRVM_serveredictfloat(ent, movetype) == MOVETYPE_SPECTATOR) ? MOVE_WORLDONLY : MOVE_NOMONSTERS), ent, contents); if (trace.startsupercontents & contents) return true; else @@ -2261,7 +2261,8 @@ void SV_WalkMove (prvm_edict_t *ent) if (sv.frametime <= 0) return; - SV_CheckStuck (ent); + //if(PRVM_serveredictfloat(ent, movetype) == MOVETYPE_SPECTATOR) + SV_CheckStuck (ent); applygravity = !SV_CheckWater (ent) && PRVM_serveredictfloat(ent, movetype) == MOVETYPE_WALK && ! ((int)PRVM_serveredictfloat(ent, flags) & FL_WATERJUMP); -- 2.39.2