]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/ladder.qc
Merge branch 'master' into terencehill/infomessages_panel_update
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / ladder.qc
index 570ef3bad23e0c15c9fb844029e7ade4ac571029..af5065643bf9a6957fd0de37d50cba53a7f58d9c 100644 (file)
@@ -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,33 +15,32 @@ 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(entity this)
 {
-       this.SendEntity = func_ladder_send;
-       this.SendFlags = 0xFFFFFF;
+       trigger_link(this, func_ladder_send);
        //this.model = "null";
 }
 
 void func_ladder_init(entity this)
 {
-       this.touch = func_ladder_touch;
+       settouch(this, func_ladder_touch);
 
        trigger_init(this);
        func_ladder_link(this);
@@ -75,7 +74,7 @@ NET_HANDLE(ENT_CLIENT_LADDER, bool isnew)
        trigger_common_read(this, false);
 
        this.solid = SOLID_TRIGGER;
-       this.move_touch = func_ladder_touch;
+       settouch(this, func_ladder_touch);
        this.drawmask = MASK_NORMAL;
        this.move_time = time;
        this.entremove = func_ladder_remove;