X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmain.qc;h=ca3fb3093e85e9396b1c64ac76f57151adab67a3;hp=b56887878d392b9651ed518a19d3f4f2f8f65135;hb=4c7352309564fc88b28216e0aa9ac509ce4d3dc6;hpb=17f8cdecf39482eca4a49623d67bfdb5f4477d29 diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index b56887878d..ca3fb3093e 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -23,13 +23,15 @@ #include "wall.qh" #include "waypointsprites.qh" -#include "vehicles/bumblebee.qh" -#include "vehicles/all.qh" +#include "../common/vehicles/all.qh" + +#include "mutators/events.qh" #include "weapons/projectile.qh" #include "../common/buffs.qh" #include "../common/deathtypes.qh" +#include "../common/effects.qh" #include "../common/mapinfo.qh" #include "../common/monsters/all.qh" #include "../common/nades.qh" @@ -40,6 +42,8 @@ #include "../common/items/all.qh" +#include "../common/mutators/base.qh" + #include "../common/weapons/all.qh" #include "../csqcmodellib/cl_model.qh" @@ -141,10 +145,10 @@ void CSQC_Init(void) // needs to be done so early because of the constants they create static_init(); - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels); + CALL_ACCUMULATED_FUNCTION(RegisterEffects); WaypointSprite_Load(); @@ -157,7 +161,6 @@ void CSQC_Init(void) Hook_Precache(); GibSplash_Precache(); Casings_Precache(); - Vehicles_Precache(); turrets_precache(); Tuba_Precache(); CSQCPlayer_Precache(); @@ -886,6 +889,7 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_KEYLOCK: ent_keylock(); break; case ENT_CLIENT_TRAIN: ent_train(); break; case ENT_CLIENT_TRIGGER_IMPULSE: ent_trigger_impulse(); break; + case ENT_CLIENT_EFFECT: Read_Effect(bIsNewEntity); break; default: //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype)); @@ -1252,69 +1256,55 @@ void Net_WeaponComplain() // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event. float CSQC_Parse_TempEntity() { - float bHandled; - bHandled = true; // Acquire TE ID - float nTEID; - nTEID = ReadByte(); + int nTEID = ReadByte(); - if(autocvar_developer_csqcentities) + if (autocvar_developer_csqcentities) printf("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID); - // NOTE: Could just do return instead of break... - switch(nTEID) + switch (nTEID) { + case TE_CSQC_MUTATOR: + int mutID = ReadMutator(); + if (MUTATOR_CALLHOOK(CSQC_Parse_TempEntity, mutID)) + return true; case TE_CSQC_TARGET_MUSIC: Net_TargetMusic(); - bHandled = true; - break; + return true; case TE_CSQC_PICTURE: Net_MapVote_Picture(); - bHandled = true; - break; + return true; case TE_CSQC_RACE: Net_ReadRace(); - bHandled = true; - break; + return true; case TE_CSQC_VORTEXBEAMPARTICLE: Net_ReadVortexBeamParticle(); - bHandled = true; - break; + return true; case TE_CSQC_TEAMNAGGER: Net_TeamNagger(); - bHandled = true; - break; + return true; case TE_CSQC_ARC: Net_ReadArc(); - bHandled = true; - break; + return true; case TE_CSQC_PINGPLREPORT: Net_ReadPingPLReport(); - bHandled = true; - break; + return true; case TE_CSQC_WEAPONCOMPLAIN: Net_WeaponComplain(); - bHandled = true; - break; + return true; case TE_CSQC_VEHICLESETUP: Net_VehicleSetup(); - bHandled = true; - break; + return true; case TE_CSQC_SVNOTICE: cl_notice_read(); - bHandled = true; - break; + return true; case TE_CSQC_SHOCKWAVEPARTICLE: Net_ReadShockwaveParticle(); - bHandled = true; - break; + return true; default: // No special logic for this temporary entity; return 0 so the engine can handle it - bHandled = false; - break; + return false; } - - return bHandled; } string getcommandkey(string text, string command)