X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fnexball%2Fnexball.qc;h=07479cc19714a13487c7ed49fc49ae41bc93e089;hb=2300937585fd409c578a516ed5e051ba389646d4;hp=2668f7e19615a46ca2375be87b9676ca160b49af;hpb=678388b78fdaad89fc8218dadf7007432b4153c3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 2668f7e19..07479cc19 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -609,11 +609,10 @@ spawnfunc(nexball_football) SpawnBall(this); } -float nb_Goal_Customize(entity this) +bool nb_Goal_Customize(entity this, entity client) { - entity e, wp_owner; - e = WaypointSprite_getviewentity(other); - wp_owner = this.owner; + entity e = WaypointSprite_getviewentity(client); + entity wp_owner = this.owner; if(SAME_TEAM(e, wp_owner)) { return false; } return true; @@ -838,7 +837,7 @@ void W_Nexball_Attack2(entity actor) CSQCProjectile(missile, true, PROJECTILE_ELECTRO, true); } -float ball_customize(entity this) +bool ball_customize(entity this, entity client) { if(!this.owner) { @@ -848,7 +847,7 @@ float ball_customize(entity this) return true; } - if(other == this.owner) + if(client == this.owner) { this.scale = autocvar_g_nexball_viewmodel_scale; if(this.enemy) @@ -1073,6 +1072,17 @@ MUTATOR_HOOKFUNCTION(nb, FilterItem) return false; } +MUTATOR_HOOKFUNCTION(nb, ItemTouch) +{ + entity item = M_ARGV(0, entity); + entity toucher = M_ARGV(1, entity); + + if(item.weapon && toucher.ballcarried) + return MUT_ITEMTOUCH_RETURN; // no new weapons for you, mister! + + return MUT_ITEMTOUCH_CONTINUE; +} + MUTATOR_HOOKFUNCTION(nb, GetTeamCount) { M_ARGV(1, string) = "nexball_team";