X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmain.qc;h=6d075b2f8690af5eaa72467375f6c3c2f070df8a;hp=b753139c4615115c2f318c1efc86f18e77bb3935;hb=221325d0a55851348e3397354225f04cd472d42f;hpb=82dbcadfd0556053b74638f2e3ae2e57103ddf26 diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index b753139c46..6d075b2f86 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1,20 +1,54 @@ +#include "main.qh" +#include "_all.qh" + +#include "casings.qh" +#include "csqcmodel_hooks.qh" +#include "damage.qh" +#include "effects.qh" +#include "gibs.qh" +#include "hook.qh" +#include "hud.qh" +#include "hud_config.qh" +#include "laser.qh" #include "mapvoting.qh" #include "modeleffects.qh" #include "particles.qh" +#include "prandom.qh" #include "scoreboard.qh" #include "shownames.qh" -#include "target_music.qh" +#include "sortlist.qh" #include "tuba.qh" +#include "t_items.qh" #include "wall.qh" #include "waypointsprites.qh" -#include "vehicles/vehicles.qh" +#include "../common/vehicles/unit/bumblebee.qh" +#include "../common/vehicles/cl_vehicles.qh" +#include "../common/vehicles/vehicles.qh" -#include "../server/vehicles/bumblebee.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" #include "../common/net_notice.qh" +#include "../common/notifications.qh" +#include "../common/stats.qh" +#include "../common/teams.qh" -#include "../common/monsters/monsters.qh" +#include "../common/items/all.qh" + +#include "../common/mutators/base.qh" + +#include "../common/weapons/all.qh" + +#include "../csqcmodellib/cl_model.qh" +#include "../csqcmodellib/interpolate.qh" + +#include "../common/triggers/include.qh" #include "../common/turrets/cl_turrets.qh" #include "../common/turrets/turrets.qh" @@ -91,6 +125,9 @@ void CSQC_Init(void) registercvar("cl_nade_type", "3"); registercvar("cl_pokenade_type", "zombie"); + registercvar("cl_jumpspeedcap_min", ""); + registercvar("cl_jumpspeedcap_max", ""); + gametype = 0; // hud_fields uses strunzone on the titles! @@ -109,14 +146,13 @@ void CSQC_Init(void) GetTeam(NUM_SPECTATOR, true); // add specs first // needs to be done so early because of the constants they create - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); + static_init(); CALL_ACCUMULATED_FUNCTION(RegisterTurrets); - CALL_ACCUMULATED_FUNCTION(RegisterMonsters); - CALL_ACCUMULATED_FUNCTION(RegisterGametypes); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels); - CALL_ACCUMULATED_FUNCTION(RegisterBuffs); + CALL_ACCUMULATED_FUNCTION(RegisterEffects); + CALL_ACCUMULATED_FUNCTION(RegisterVehicles); WaypointSprite_Load(); @@ -129,7 +165,6 @@ void CSQC_Init(void) Hook_Precache(); GibSplash_Precache(); Casings_Precache(); - Vehicles_Precache(); Tuba_Precache(); CSQCPlayer_Precache(); @@ -350,6 +385,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) // -------------------------------------------------------------------------- // BEGIN OPTIONAL CSQC FUNCTIONS + void Ent_RemoveEntCS() { entcs_receiver[self.sv_entnum] = world; @@ -667,7 +703,7 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint if(is_new) { self.origin = spn_origin; - setsize(self, PL_MIN, PL_MAX); + setsize(self, PL_MIN_CONST, PL_MAX_CONST); droptofloor(); /*if(autocvar_cl_spawn_point_model) // needs a model first @@ -831,6 +867,7 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_WARPZONE_TELEPORTED: WarpZone_Teleported_Read(bIsNewEntity); break; case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break; case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break; + case ENT_CLIENT_INVENTORY: Inventory_Read(self); break; case ENT_CLIENT_ARC_BEAM: Ent_ReadArcBeam(bIsNewEntity); break; case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break; case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break; @@ -842,6 +879,20 @@ void CSQC_Ent_Update(float bIsNewEntity) case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break; case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break; case ENT_CLIENT_HEALING_ORB: ent_healer(); break; + case ENT_CLIENT_VIEWLOC: ent_viewloc(); break; + case ENT_CLIENT_VIEWLOC_TRIGGER: ent_viewloc_trigger(); break; + case ENT_CLIENT_LADDER: ent_func_ladder(); break; + case ENT_CLIENT_TRIGGER_PUSH: ent_trigger_push(); break; + case ENT_CLIENT_TARGET_PUSH: ent_target_push(); break; + case ENT_CLIENT_CONVEYOR: ent_conveyor(); break; + case ENT_CLIENT_DOOR: ent_door(); break; + case ENT_CLIENT_PLAT: ent_plat(); break; + case ENT_CLIENT_SWAMP: ent_swamp(); break; + case ENT_CLIENT_CORNER: ent_corner(); break; + 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));