+#include "corner.qh"
REGISTER_NET_LINKED(ENT_CLIENT_CORNER)
#ifdef SVQC
WriteString(MSG_ENTITY, this.platmovetype);
- WriteCoord(MSG_ENTITY, this.origin_x);
- WriteCoord(MSG_ENTITY, this.origin_y);
- WriteCoord(MSG_ENTITY, this.origin_z);
+ WriteVector(MSG_ENTITY, this.origin);
WriteString(MSG_ENTITY, this.target);
WriteString(MSG_ENTITY, this.target2);
void corner_remove(entity this)
{
- if(this.target) { strunzone(this.target); }
- this.target = string_null;
-
- if(this.target2) { strunzone(this.target2); }
- this.target2 = string_null;
-
- if(this.target3) { strunzone(this.target3); }
- this.target3 = string_null;
-
- if(this.target4) { strunzone(this.target4); }
- this.target4 = string_null;
-
- if(this.targetname) { strunzone(this.targetname); }
- this.targetname = string_null;
-
- if(this.platmovetype) { strunzone(this.platmovetype); }
- this.platmovetype = string_null;
+ strfree(this.target);
+ strfree(this.target2);
+ strfree(this.target3);
+ strfree(this.target4);
+ strfree(this.targetname);
+ strfree(this.platmovetype);
}
NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
{
this.platmovetype = strzone(ReadString());
- this.origin_x = ReadCoord();
- this.origin_y = ReadCoord();
- this.origin_z = ReadCoord();
+ this.origin = ReadVector();
setorigin(this, this.origin);
this.target = strzone(ReadString());