]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Mark pure entities
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Mar 2016 08:13:17 +0000 (19:13 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Mar 2016 08:13:17 +0000 (19:13 +1100)
qcsrc/common/constants.qh
qcsrc/common/effects/qc/modeleffects.qc
qcsrc/common/mutators/base.qh
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh

index b0445abf18b175b11a0aacdada1f5b81999b14cb..63ef9bf27ca4419cc57f6338982a595a821b54fd 100644 (file)
@@ -50,7 +50,7 @@ const int RANKINGS_CNT = 15;
 
 REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
 #ifdef CSQC
-NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { return true; }
+NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { make_pure(this); return true; }
 #endif
 /** Sent as a temp entity from a persistent linked entity */
 REGISTER_NET_TEMP(ENT_CLIENT_INIT)
index d7e437eb3944567bacbbca551ff09a61b27a214c..99272f8cc5fc1117c75ba078efb48b0909031916 100644 (file)
@@ -114,7 +114,7 @@ void ModelEffect_Draw(entity this)
 
 NET_HANDLE(ENT_CLIENT_MODELEFFECT, bool isnew)
 {
-       make_pure(self);
+       make_pure(this);
 
        int f = ReadByte();
 
index 62df8dcbc10c516e648fa0068bbd684d9da8834e..b5265ec0c6bd51bb97fa160002bfc47ed77c9b3a 100644 (file)
@@ -166,6 +166,7 @@ void Mutator_Remove(Mutator mut);
 bool mutator_log = false;
 
 #ifndef MENUQC
+/** server mutators activate corresponding client mutators for all clients */
 REGISTER_NET_LINKED(Mutator)
 
 #ifdef SVQC
@@ -188,6 +189,7 @@ void NET_Mutator_Remove(entity this)
 }
 NET_HANDLE(Mutator, bool isNew)
 {
+    make_pure(this);
     string s = this.netname = ReadString();
     return = true;
     if (isNew)
index 92207d844488083cc01f7b3aeed19a078abe2166..7b922bf89de0a4f8db4f053c17fe08a3bdac3e86 100644 (file)
@@ -1425,11 +1425,13 @@ void Local_Notification_WOVA(
 //  Notification Networking
 // =========================
 
+/** networked as a linked entity to give newly connecting clients some notification context */
 REGISTER_NET_LINKED(ENT_CLIENT_NOTIFICATION)
 
 #ifdef CSQC
 NET_HANDLE(ENT_CLIENT_NOTIFICATION, bool is_new)
 {
+       make_pure(this);
        int net_type = ReadByte();
        int net_name = ReadShort();
        Notification notif = Get_Notif_Ent(net_type, net_name);
index 232ec6ae7e866f48a834fe1a85ff50c0bf940875..36fc2037651b4b12e46173e4cb61558a5dde3fb2 100644 (file)
@@ -41,12 +41,12 @@ typedef entity Notification;
 // negative confirmations
 /** allows various things to know when no information is added */
 Notification NO_MSG;
-STATIC_INIT(NO_MSG) { NO_MSG = new(Notification); }
+STATIC_INIT(NO_MSG) { NO_MSG = new_pure(Notification); }
 /** @deprecated */
 const int NO_MSG_ = -12345;
 /** allows Send_Notification to safely abort sending */
 Notification NOTIF_ABORT;
-STATIC_INIT(NOTIF_ABORT) { NOTIF_ABORT = new(Notification); }
+STATIC_INIT(NOTIF_ABORT) { NOTIF_ABORT = new_pure(Notification); }
 
 // used for notification system multi-team identifiers
 #define APP_TEAM_NUM(num, prefix) ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK)))