]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a few more selfparam's randomly
authorMario <mario@smbclan.net>
Thu, 9 Jun 2016 11:34:36 +0000 (21:34 +1000)
committerMario <mario@smbclan.net>
Thu, 9 Jun 2016 11:34:36 +0000 (21:34 +1000)
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/minigame/nmm.qc

index 4e3bfc25d3609ca7e36c321b90a70011a1dead3b..bff2b0aa13939f0c3225e52a55000c228f366b3f 100644 (file)
@@ -160,14 +160,14 @@ string ReadString_Zoned() { return strzone(ReadString_Raw()); }
 #define MSLE(Name,Fields) \
        else if ( this.classname == #Name ) { \
                if ( sf & MINIG_SF_CREATE ) { \
-                       minigame_read_owner(); \
+                       minigame_read_owner(this); \
                        this.entremove = msle_entremove_##Name; \
                } \
                minigame_ent = this.owner; \
                Fields \
        }
-void minigame_read_owner()
-{SELFPARAM();
+void minigame_read_owner(entity this)
+{
        string owner_name = ReadString_Raw();
        this.owner = world;
        do
@@ -209,7 +209,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew)
                if ( sf & MINIG_SF_CREATE )
                {
                        this.entremove = minigame_player_entremove;
-                       minigame_read_owner();
+                       minigame_read_owner(this);
                        float ent = ReadLong();
                        this.minigame_playerslot = ent;
                        LOG_DEBUG("Player: ",entcs_GetName(ent-1),"\n");
index e4e0dc6380d9aec56a1b05601a8f5d733fe1b9c5..2e3ee10d641ef28b2ffdeb285b38b718eb9dfbe9 100644 (file)
@@ -618,7 +618,7 @@ string nmm_turn_to_string(int turnflags)
 
 // Required function, handle client events
 int nmm_client_event(entity minigame, string event, ...)
-{SELFPARAM();
+{
        if ( event == "activate" )
        {
                nmm_fromtile = world;
@@ -729,27 +729,29 @@ int nmm_client_event(entity minigame, string event, ...)
        }
        else if ( event == "network_receive" )
        {
-               if ( self.classname == "minigame_board_piece" && ( ...(1,int) & MINIG_SF_UPDATE ) )
+               entity sent = ...(0,entity);
+
+               if ( sent.classname == "minigame_board_piece" && ( ...(1,int) & MINIG_SF_UPDATE ) )
                {
                        entity e;
                        string tileid = "";
-                       if ( self.minigame_flags & NMM_PIECE_BOARD )
-                               tileid = minigame_tile_name(self.origin,7,7);
+                       if ( sent.minigame_flags & NMM_PIECE_BOARD )
+                               tileid = minigame_tile_name(sent.origin,7,7);
                        FOREACH_MINIGAME_ENTITY(e)
                        {
                                if ( e.classname == "minigame_nmm_tile" )
                                {
-                                       if ( e.nmm_tile_piece == self )
+                                       if ( e.nmm_tile_piece == sent )
                                                e.nmm_tile_piece = world;
                                        if ( e.netname == tileid )
-                                               e.nmm_tile_piece = self;
+                                               e.nmm_tile_piece = sent;
                                }
                        }
                }
-               else if ( self.classname == "minigame" && ( ...(1,int) & MINIG_SF_UPDATE ) )
+               else if ( sent.classname == "minigame" && ( ...(1,int) & MINIG_SF_UPDATE ) )
                {
-                       self.message = nmm_turn_to_string(self.minigame_flags);
-                       if ( self.minigame_flags & minigame_self.team )
+                       sent.message = nmm_turn_to_string(sent.minigame_flags);
+                       if ( sent.minigame_flags & minigame_self.team )
                                minigame_prompt();
                }
        }