X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fladder.qc;h=af5065643bf9a6957fd0de37d50cba53a7f58d9c;hb=fc15d72b041c9a748b605ba28735380fbe5b5b01;hp=44687de4a163a57aa63156d38b7bea582610202d;hpb=724a41faf2cbfd86d41f3ab59ff8326a831a8326;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/ladder.qc b/qcsrc/common/triggers/func/ladder.qc index 44687de4a..af5065643 100644 --- a/qcsrc/common/triggers/func/ladder.qc +++ b/qcsrc/common/triggers/func/ladder.qc @@ -1,7 +1,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_LADDER) -void func_ladder_touch() -{SELFPARAM(); +void func_ladder_touch(entity this) +{ #ifdef SVQC if (!other.iscreature) return; @@ -15,46 +15,45 @@ void func_ladder_touch() EXACTTRIGGER_TOUCH; other.ladder_time = time + 0.1; - other.ladder_entity = self; + other.ladder_entity = this; } #ifdef SVQC -bool func_ladder_send(entity to, int sf) -{SELFPARAM(); +bool func_ladder_send(entity this, entity to, int sf) +{ WriteHeader(MSG_ENTITY, ENT_CLIENT_LADDER); - WriteString(MSG_ENTITY, self.classname); - WriteByte(MSG_ENTITY, self.skin); - WriteCoord(MSG_ENTITY, self.speed); + WriteString(MSG_ENTITY, this.classname); + WriteByte(MSG_ENTITY, this.skin); + WriteCoord(MSG_ENTITY, this.speed); - trigger_common_write(self, false); + trigger_common_write(this, false); return true; } -void func_ladder_link() +void func_ladder_link(entity this) { - self.SendEntity = func_ladder_send; - self.SendFlags = 0xFFFFFF; - //self.model = "null"; + trigger_link(this, func_ladder_send); + //this.model = "null"; } -void func_ladder_init() +void func_ladder_init(entity this) { - self.touch = func_ladder_touch; + settouch(this, func_ladder_touch); - trigger_init(self); - func_ladder_link(); + trigger_init(this); + func_ladder_link(this); } spawnfunc(func_ladder) { - func_ladder_init(); + func_ladder_init(this); } spawnfunc(func_water) { - func_ladder_init(); + func_ladder_init(this); } #elif defined(CSQC) @@ -68,17 +67,17 @@ void func_ladder_remove(entity this) NET_HANDLE(ENT_CLIENT_LADDER, bool isnew) { - self.classname = strzone(ReadString()); - self.skin = ReadByte(); - self.speed = ReadCoord(); + this.classname = strzone(ReadString()); + this.skin = ReadByte(); + this.speed = ReadCoord(); - trigger_common_read(false); + trigger_common_read(this, false); - self.solid = SOLID_TRIGGER; - self.move_touch = func_ladder_touch; - self.drawmask = MASK_NORMAL; - self.move_time = time; - self.entremove = func_ladder_remove; + this.solid = SOLID_TRIGGER; + settouch(this, func_ladder_touch); + this.drawmask = MASK_NORMAL; + this.move_time = time; + this.entremove = func_ladder_remove; return true; }