From: TimePath Date: Sun, 1 Nov 2015 11:17:03 +0000 (+1100) Subject: Merge branch 'master' into TimePath/debug_draw X-Git-Tag: xonotic-v0.8.2~1729^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b683bf23a495d3b1b3f6df3bda75bfe0f069ab05;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into TimePath/debug_draw # Conflicts: # qcsrc/common/effects/all.qc # qcsrc/lib/net.qh --- b683bf23a495d3b1b3f6df3bda75bfe0f069ab05 diff --cc qcsrc/common/effects/all.qc index 7172a202a,a18d741f6..bc7391922 --- a/qcsrc/common/effects/all.qc +++ b/qcsrc/common/effects/all.qc @@@ -5,12 -4,12 +5,12 @@@ REGISTER_NET_TEMP(net_effect, bool isNe { int net_name = (Effects_COUNT >= 255) ? ReadShort() : ReadByte(); - entity eff = Effects[net_name]; + entity eff = Effects_from(net_name); - vector v, vel = '0 0 0'; + vector vel = '0 0 0'; int eff_cnt = 1; bool eff_trail = eff.eent_eff_trail; + vector v; v_x = ReadCoord(); v_y = ReadCoord(); v_z = ReadCoord(); @@@ -26,10 -25,13 +26,10 @@@ if(!eff_trail) eff_cnt = ReadByte(); - if(is_new) - { - if(eff_trail) - WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel); - else - pointparticles(eff, v, vel, eff_cnt); - } + if(eff_trail) + WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel); + else - pointparticles(particleeffectnum(eff), v, vel, eff_cnt); ++ pointparticles(eff, v, vel, eff_cnt); } #endif diff --cc qcsrc/common/minigames/cl_minigames.qh index 223e2c0b9,9a5131995..aacfc2309 --- a/qcsrc/common/minigames/cl_minigames.qh +++ b/qcsrc/common/minigames/cl_minigames.qh @@@ -114,10 -114,11 +114,11 @@@ void HUD_MinigameMenu_CustomEntry(entit while( (entityvar = findentity(entityvar,owner,active_minigame)) ) - REGISTRY(Minigames, BIT(3)) + REGISTRY(Minigames, BITS(3)) + #define Minigames_from(i) _Minigames_from(i, NULL) REGISTER_REGISTRY(RegisterMinigames) #define REGISTER_MINIGAME(name,nicename) \ - REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, spawn()); \ + REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, new(minigame_descriptor)); \ void name##_hud_board(vector, vector); \ void name##_hud_status(vector, vector); \ int name##_client_event(entity, string, ...); \ diff --cc qcsrc/common/minigames/sv_minigames.qh index b3a6ce2ee,02c3c82fa..422e78081 --- a/qcsrc/common/minigames/sv_minigames.qh +++ b/qcsrc/common/minigames/sv_minigames.qh @@@ -46,13 -46,14 +46,14 @@@ entity minigame_sessions bool minigame_SendEntity(entity this, entity to, int sf); - REGISTRY(Minigames, BIT(3)) + REGISTRY(Minigames, BITS(3)) + #define Minigames_from(i) _Minigames_from(i, NULL) REGISTER_REGISTRY(RegisterMinigames) #define REGISTER_MINIGAME(name,nicename) \ - REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, spawn()); \ + REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, new(minigame_descriptor)); \ int name##_server_event(entity, string, ...); \ REGISTER_INIT_POST(MINIGAME, name) { \ - this.classname = "minigame_descriptor"; \ + make_pure(this); \ this.netname = strzone(strtolower(#name)); \ this.message = nicename; \ this.minigame_event = name##_server_event; \ diff --cc qcsrc/common/mutators/mutator/waypoints/all.qh index 6bc672902,d5187b4b8..e04629b6f --- a/qcsrc/common/mutators/mutator/waypoints/all.qh +++ b/qcsrc/common/mutators/mutator/waypoints/all.qh @@@ -26,9 -27,10 +27,10 @@@ ENDCLASS(Waypoint #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink)) REGISTRY(RadarIcons, BITS(7)) + #define RadarIcons_from(i) _RadarIcons_from(i, RADARICON_NONE) REGISTER_REGISTRY(RegisterRadarIcons) .int m_radaricon; -#define REGISTER_RADARICON(id, num) REGISTER(RegisterRadarIcons, RADARICON, RadarIcons, id, m_id, new(RadarIcon)) { this.m_radaricon = num; this.netname = #id; } +#define REGISTER_RADARICON(id, num) REGISTER(RegisterRadarIcons, RADARICON, RadarIcons, id, m_id, new(RadarIcon)) { make_pure(this); this.m_radaricon = num; this.netname = #id; } REGISTER_WAYPOINT(Null, "", '0 0 0', 1);