X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fportals.qc;h=18600463741fc20bb88e1fd5baf07b7a9ddb47bc;hb=46ae54b152183f3e2895457f958fe830b1d97eb8;hp=e02c04d6b25e5bcffc0139424d51a2c0fadfad0b;hpb=ef74e1ba8e890befb4a4892a96d244a66c05fd48;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index e02c04d6b..186004637 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -1,18 +1,20 @@ #include "portals.qh" -#include "_all.qh" #include "g_hook.qh" -#include "mutators/mutators_include.qh" +#include "mutators/all.qh" #include "../common/constants.qh" -#include "../common/deathtypes.qh" +#include "../common/deathtypes/all.qh" #include "../common/notifications.qh" #include "../common/triggers/teleporters.qh" #include "../common/triggers/subs.qh" #include "../common/util.qh" #include "../common/weapons/all.qh" -#include "../csqcmodellib/sv_model.qh" -#include "../warpzonelib/anglestransform.qh" -#include "../warpzonelib/util_server.qh" +#include "../lib/csqcmodel/sv_model.qh" +#include "../lib/warpzone/anglestransform.qh" +#include "../lib/warpzone/util_server.qh" +#include "../lib/warpzone/common.qh" +#include "../common/vehicles/vehicle.qh" +#include "../common/vehicles/sv_vehicles.qh" #define PORTALS_ARE_NOT_SOLID @@ -414,21 +416,21 @@ void Portal_Remove(entity portal, float killed) if(killed) { fixedmakevectors(portal.mangle); - sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTEN_NORM); + 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); } else { Portal_MakeBrokenPortal(portal); - sound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTEN_NORM); + sound(portal, CH_SHOTS, SND_PORTO_EXPIRE, VOL_BASE, ATTEN_NORM); SUB_SetFade(portal, time, 0.5); } } void Portal_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) {SELFPARAM(); - if(deathtype == DEATH_TELEFRAG) + if(deathtype == DEATH_TELEFRAG.m_id) return; if(attacker != self.aiment) if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(self.aiment)) @@ -622,8 +624,7 @@ entity Portal_Spawn(entity own, vector org, vector ang) if(!CheckWireframeBox(own, org - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward)) return world; - portal = spawn(); - portal.classname = "portal"; + portal = new(portal); portal.aiment = own; setorigin(portal, org); portal.mangle = ang; @@ -636,7 +637,7 @@ entity Portal_Spawn(entity own, vector org, vector ang) portal.event_damage = Portal_Damage; portal.fade_time = time + autocvar_g_balance_portal_lifetime; portal.health = autocvar_g_balance_portal_health; - setmodel(portal, "models/portal.md3"); + setmodel(portal, MDL_PORTAL); portal.savemodelindex = portal.modelindex; portal.customizeentityforclient = Portal_Customize;