From: TimePath Date: Sat, 5 Mar 2016 08:13:17 +0000 (+1100) Subject: Mark pure entities X-Git-Tag: xonotic-v0.8.2~1132^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=803d14bb4e65a86116e6cd6d81e9ba02e5275f76;p=xonotic%2Fxonotic-data.pk3dir.git Mark pure entities --- diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index b0445abf1..63ef9bf27 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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) diff --git a/qcsrc/common/effects/qc/modeleffects.qc b/qcsrc/common/effects/qc/modeleffects.qc index d7e437eb3..99272f8cc 100644 --- a/qcsrc/common/effects/qc/modeleffects.qc +++ b/qcsrc/common/effects/qc/modeleffects.qc @@ -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(); diff --git a/qcsrc/common/mutators/base.qh b/qcsrc/common/mutators/base.qh index 62df8dcbc..b5265ec0c 100644 --- a/qcsrc/common/mutators/base.qh +++ b/qcsrc/common/mutators/base.qh @@ -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) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 92207d844..7b922bf89 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -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); diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 232ec6ae7..36fc20376 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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)))