//description:
//MOVETYPE_BOUNCE but without gravity, and with full reflection (no speed loss like grenades have), in other words - bouncing laser bolts.
+//DP_MOVETYPEFLYWORLDONLY
+//idea: Samual
+//darkplaces implementation: Samual
+//movetype definitions:
+float MOVETYPE_FLY_WORLDONLY = 33;
+//description:
+//like MOVETYPE_FLY, but does all traces with MOVE_WORLDONLY, and is ignored by MOVETYPE_PUSH. Should only be combined with SOLID_NOT and SOLID_TRIGGER.
+
//DP_NULL_MODEL
//idea: Chris
//darkplaces implementation: divVerent
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_FLY_WORLDONLY) ? MOVE_WORLDONLY : MOVE_NOMONSTERS), ent, contents);
if (trace.startsupercontents & contents)
return true;
else
if (PRVM_serveredictfloat(check, movetype) == MOVETYPE_PUSH
|| PRVM_serveredictfloat(check, movetype) == MOVETYPE_NONE
|| PRVM_serveredictfloat(check, movetype) == MOVETYPE_FOLLOW
- || PRVM_serveredictfloat(check, movetype) == MOVETYPE_NOCLIP)
+ || PRVM_serveredictfloat(check, movetype) == MOVETYPE_NOCLIP
+ || PRVM_serveredictfloat(check, movetype) == MOVETYPE_FLY_WORLDONLY)
continue;
if (SV_TestEntityPosition (check, vec3_origin))
if (movetype == MOVETYPE_FLYMISSILE)
type = MOVE_MISSILE;
+ else if (movetype == MOVETYPE_FLY_WORLDONLY)
+ type = MOVE_WORLDONLY;
else if (solid == SOLID_TRIGGER || solid == SOLID_NOT)
type = MOVE_NOMONSTERS; // only clip against bmodels
else
case MOVETYPE_PUSH:
case MOVETYPE_FOLLOW:
case MOVETYPE_NOCLIP:
+ case MOVETYPE_FLY_WORLDONLY:
continue;
default:
break;
VectorSet(downmove, PRVM_serveredictvector(ent, origin)[0], PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2] - 1);
if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_FLYMISSILE)
type = MOVE_MISSILE;
+ else if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_FLY_WORLDONLY)
+ type = MOVE_WORLDONLY;
else if (PRVM_serveredictfloat(ent, solid) == SOLID_TRIGGER || PRVM_serveredictfloat(ent, solid) == SOLID_NOT)
type = MOVE_NOMONSTERS; // only clip against bmodels
else
case MOVETYPE_BOUNCEMISSILE:
case MOVETYPE_FLYMISSILE:
case MOVETYPE_FLY:
+ case MOVETYPE_FLY_WORLDONLY:
// regular thinking
if (SV_RunThink (ent))
SV_Physics_Toss (ent);
SV_Physics_Toss (ent);
break;
case MOVETYPE_FLY:
+ case MOVETYPE_FLY_WORLDONLY:
SV_RunThink (ent);
SV_WalkMove (ent);
break;