X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Ftrigger%2Fjumppads.qc;h=a6128d207fb8c334d092dcee26cd41ab261186cb;hb=0514f7948727cfa572b33bd29d1bdf2c13cd866d;hp=f438fbf01f5f8295032f45aa8e76647825377b04;hpb=ad2d918472c84295255fba550959b58cacc9cfb1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index f438fbf01..a6128d207 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -36,8 +36,8 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht, entity p torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5; grav = PHYS_GRAVITY(NULL); - if(pushed_entity && PHYS_ENTGRAVITY(pushed_entity)) - grav *= PHYS_ENTGRAVITY(pushed_entity); + if(pushed_entity && pushed_entity.gravity) + grav *= pushed_entity.gravity; zdist = torg.z - org.z; sdist = vlen(torg - org - zdist * '0 0 1'); @@ -135,9 +135,9 @@ bool jumppad_push(entity this, entity targ) vector org = targ.origin; #ifdef SVQC - if(autocvar_sv_vq3compat) + if(autocvar_sv_q3defragcompat) #elif defined(CSQC) - if(STAT(VQ3COMPAT)) + if(STAT(Q3DEFRAGCOMPAT)) #endif { org.z += targ.mins_z; @@ -571,8 +571,6 @@ float trigger_push_send(entity this, entity to, float sf) WriteByte(MSG_ENTITY, this.active); WriteCoord(MSG_ENTITY, this.height); - WriteVector(MSG_ENTITY, this.movedir); - trigger_common_write(this, true); return true; @@ -636,9 +634,7 @@ bool target_push_send(entity this, entity to, float sf) WriteString(MSG_ENTITY, this.targetname); WriteVector(MSG_ENTITY, this.origin); - WriteAngle(MSG_ENTITY, this.angles_x); - WriteAngle(MSG_ENTITY, this.angles_y); - WriteAngle(MSG_ENTITY, this.angles_z); + WriteAngleVector(MSG_ENTITY, this.angles); return true; } @@ -694,18 +690,11 @@ spawnfunc(target_position) NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew) { - this.classname = "jumppad"; - int mytm = ReadByte(); - if(mytm) - { - this.team = mytm - 1; - } + int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; } this.spawnflags = ReadInt24_t(); this.active = ReadByte(); this.height = ReadCoord(); - this.movedir = ReadVector(); - trigger_common_read(this, true); this.entremove = trigger_remove_generic; @@ -725,14 +714,11 @@ void target_push_remove(entity this) NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew) { - this.classname = "push_target"; this.cnt = ReadByte(); this.targetname = strzone(ReadString()); this.origin = ReadVector(); - this.angles_x = ReadAngle(); - this.angles_y = ReadAngle(); - this.angles_z = ReadAngle(); + this.angles = ReadAngleVector(); return = true;