X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fplat.qc;h=9f97a1cea09b764d2021900fb011be0978254541;hp=5d90924daa248b0e079f8ff4bc99bf5b6c4e125e;hb=95a5a2479a35e264473e8ba3fc4e584553da42b3;hpb=34e7f534e2015466228eb3a78c9857741b736dca diff --git a/qcsrc/common/triggers/func/plat.qc b/qcsrc/common/triggers/func/plat.qc index 5d90924da..9f97a1cea 100644 --- a/qcsrc/common/triggers/func/plat.qc +++ b/qcsrc/common/triggers/func/plat.qc @@ -26,16 +26,10 @@ float plat_send(entity this, entity to, float sf) trigger_common_write(this, true); - WriteCoord(MSG_ENTITY, this.pos1_x); - WriteCoord(MSG_ENTITY, this.pos1_y); - WriteCoord(MSG_ENTITY, this.pos1_z); - WriteCoord(MSG_ENTITY, this.pos2_x); - WriteCoord(MSG_ENTITY, this.pos2_y); - WriteCoord(MSG_ENTITY, this.pos2_z); + WriteVector(MSG_ENTITY, this.pos1); + WriteVector(MSG_ENTITY, this.pos2); - WriteCoord(MSG_ENTITY, this.size_x); - WriteCoord(MSG_ENTITY, this.size_y); - WriteCoord(MSG_ENTITY, this.size_z); + WriteVector(MSG_ENTITY, this.size); WriteAngle(MSG_ENTITY, this.mangle_x); WriteAngle(MSG_ENTITY, this.mangle_y); @@ -73,30 +67,23 @@ spawnfunc(func_plat) if (this.sounds == 1) { - precache_sound ("plats/plat1.wav"); - precache_sound ("plats/plat2.wav"); this.noise = "plats/plat1.wav"; this.noise1 = "plats/plat2.wav"; } if (this.sounds == 2) { - precache_sound ("plats/medplat1.wav"); - precache_sound ("plats/medplat2.wav"); this.noise = "plats/medplat1.wav"; this.noise1 = "plats/medplat2.wav"; } if (this.sound1) - { - precache_sound (this.sound1); this.noise = this.sound1; - } if (this.sound2) - { - precache_sound (this.sound2); this.noise1 = this.sound2; - } + + if(this.noise && this.noise != "") { precache_sound(this.noise); } + if(this.noise1 && this.noise1 != "") { precache_sound(this.noise1); } this.mangle = this.angles; this.angles = '0 0 0'; @@ -145,16 +132,10 @@ NET_HANDLE(ENT_CLIENT_PLAT, bool isnew) trigger_common_read(this, true); - this.pos1_x = ReadCoord(); - this.pos1_y = ReadCoord(); - this.pos1_z = ReadCoord(); - this.pos2_x = ReadCoord(); - this.pos2_y = ReadCoord(); - this.pos2_z = ReadCoord(); + this.pos1 = ReadVector(); + this.pos2 = ReadVector(); - this.size_x = ReadCoord(); - this.size_y = ReadCoord(); - this.size_z = ReadCoord(); + this.size = ReadVector(); this.mangle_x = ReadAngle(); this.mangle_y = ReadAngle();