X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fwarpzone%2Fclient.qc;h=7f8b0cdc837258a7bb5547d984afbcd960430baa;hb=d7ecf0b99095f97132ddb1252268ff7d7fb8597b;hp=15a3ca4c3ccc6e90870c72ab7bc74251777dd397;hpb=21fdd7bdfc222142ffd047a200cb2bd214c5d511;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/warpzone/client.qc b/qcsrc/lib/warpzone/client.qc index 15a3ca4c3..7f8b0cdc8 100644 --- a/qcsrc/lib/warpzone/client.qc +++ b/qcsrc/lib/warpzone/client.qc @@ -28,6 +28,8 @@ void WarpZone_Fade_PreDraw(entity this) void WarpZone_Touch(entity this, entity toucher); NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew) { + if(!warpzone_warpzones_exist) + cvar_settemp("r_water", "1"); // HACK for DarkPlaces: always enable reflections when a map has warpzones warpzone_warpzones_exist = 1; if (!this.enemy) { @@ -42,32 +44,18 @@ NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew) this.warpzone_isboxy = (f & 1); if(f & 4) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); } else this.origin = '0 0 0'; this.modelindex = ReadShort(); - this.mins_x = ReadCoord(); - this.mins_y = ReadCoord(); - this.mins_z = ReadCoord(); - this.maxs_x = ReadCoord(); - this.maxs_y = ReadCoord(); - this.maxs_z = ReadCoord(); + this.mins = ReadVector(); + this.maxs = ReadVector(); this.scale = ReadByte() / 16; - this.enemy.oldorigin_x = ReadCoord(); - this.enemy.oldorigin_y = ReadCoord(); - this.enemy.oldorigin_z = ReadCoord(); - this.enemy.avelocity_x = ReadCoord(); - this.enemy.avelocity_y = ReadCoord(); - this.enemy.avelocity_z = ReadCoord(); - this.oldorigin_x = ReadCoord(); - this.oldorigin_y = ReadCoord(); - this.oldorigin_z = ReadCoord(); - this.avelocity_x = ReadCoord(); - this.avelocity_y = ReadCoord(); - this.avelocity_z = ReadCoord(); + this.enemy.oldorigin = ReadVector(); + this.enemy.avelocity = ReadVector(); + this.oldorigin = ReadVector(); + this.avelocity = ReadVector(); if(f & 2) { @@ -98,32 +86,24 @@ NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew) NET_HANDLE(ENT_CLIENT_WARPZONE_CAMERA, bool isnew) { + if(!warpzone_cameras_exist) + cvar_settemp("r_water", "1"); // HACK for DarkPlaces: always enable reflections when a map has cameras warpzone_cameras_exist = 1; this.classname = "func_warpzone_camera"; int f = ReadByte(); if(f & 4) { - this.origin_x = ReadCoord(); - this.origin_y = ReadCoord(); - this.origin_z = ReadCoord(); + this.origin = ReadVector(); } else this.origin = '0 0 0'; this.modelindex = ReadShort(); - this.mins_x = ReadCoord(); - this.mins_y = ReadCoord(); - this.mins_z = ReadCoord(); - this.maxs_x = ReadCoord(); - this.maxs_y = ReadCoord(); - this.maxs_z = ReadCoord(); + this.mins = ReadVector(); + this.maxs = ReadVector(); this.scale = ReadByte() / 16; - this.oldorigin_x = ReadCoord(); - this.oldorigin_y = ReadCoord(); - this.oldorigin_z = ReadCoord(); - this.avelocity_x = ReadCoord(); - this.avelocity_y = ReadCoord(); - this.avelocity_z = ReadCoord(); + this.oldorigin = ReadVector(); + this.avelocity = ReadVector(); if(f & 2) { @@ -157,10 +137,7 @@ void CL_RotateMoves(vector ang) = #638; NET_HANDLE(ENT_CLIENT_WARPZONE_TELEPORTED, bool isnew) { this.classname = "warpzone_teleported"; - vector v; - v.x = ReadCoord(); - v.y = ReadCoord(); - v.z = ReadCoord(); + vector v = ReadVector(); return = true; if (!isnew) return; this.warpzone_transform = v;