#include "portals.qh"
+#include <common/effects/all.qh>
#include "g_hook.qh"
-#include "mutators/all.qh"
+#include "mutators/_mod.qh"
#include "../common/constants.qh"
#include "../common/deathtypes/all.qh"
#include "../common/notifications/all.qh"
#include "../common/triggers/teleporters.qh"
#include "../common/triggers/subs.qh"
#include "../common/util.qh"
-#include "../common/weapons/all.qh"
+#include <common/weapons/_all.qh>
#include "../lib/csqcmodel/sv_model.qh"
#include "../lib/warpzone/anglestransform.qh"
#include "../lib/warpzone/util_server.qh"
tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, step, MOVE_NOMONSTERS, player);
if(trace_startsolid)
{
- LOG_INFO("'safe' teleport location is not safe!\n");
+ LOG_INFO("'safe' teleport location is not safe!");
// FAIL TODO why does this happen?
return 0;
}
tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, to, MOVE_NOMONSTERS, player);
if(trace_startsolid)
{
- LOG_INFO("trace_endpos in solid, this can't be!\n");
+ LOG_INFO("trace_endpos in solid, this can't be!");
// FAIL TODO why does this happen? (reported by MrBougo)
return 0;
}
{
vector o;
o = portal.origin;
- portal.mins = STAT(PL_MIN, NULL) - SAFERNUDGE;
- portal.maxs = STAT(PL_MAX, NULL) + SAFERNUDGE;
+ portal.mins = PL_MIN_CONST - SAFERNUDGE;
+ portal.maxs = PL_MAX_CONST + SAFERNUDGE;
fixedmakevectors(portal.mangle);
portal.origin += 16 * v_forward;
if(!move_out_of_solid(portal))
{
#ifdef DEBUG
- LOG_INFO("NO SAFE ORIGIN\n");
+ LOG_INFO("NO SAFE ORIGIN");
#endif
return 0;
}
fixedmakevectors(portal.mangle);
sound(portal, CH_SHOTS, SND_PORTO_EXPLODE, VOL_BASE, ATTEN_NORM);
Send_Effect(EFFECT_ROCKET_EXPLODE, portal.origin + v_forward * 16, v_forward * 1024, 4);
- remove(portal);
+ delete(portal);
}
else
{
fixedmakevectors(this.mangle);
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
if(it != o)
if(IS_INDEPENDENT_PLAYER(it) || IS_INDEPENDENT_PLAYER(o))
continue; // cannot go through someone else's portal
if(it != o || time >= this.portal_activatetime)
Portal_Think_TryTeleportPlayer(this, it, g);
- if(it.hook)
- Portal_Think_TryTeleportPlayer(this, it.hook, g);
- ));
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if(it.(weaponentity).hook)
+ Portal_Think_TryTeleportPlayer(this, it.(weaponentity).hook, g);
+ }
+ });
this.solid = SOLID_TRIGGER;
this.aiment = o;
#endif
if(!Portal_FindSafeOrigin(portal))
{
- remove(portal);
+ delete(portal);
return NULL;
}