Merge in xonotic/xonotic-data.pk3dir.git: Mario/mutator_minstagib
git-manager created issue #1532 (closed) on 2013-04-25T17:45:55Z:
Purpose of the branch:
Moving minstagib into the mutator API
Repository: xonotic/xonotic-data.pk3dir.git Commit: f4e8e144 Branch: Mario/mutator_minstagib
Merge commands:
cd data/xonotic-data.pk3dir
git checkout master
git reset --hard origin/master
git pull && git diff 'f4e8e144a9c8e6f1774313edba5fc6c7ecfc2335'..'origin/Mario/mutator_minstagib'
# please check that the diff you just saw did not contain anything complex that
# needs a new merge request, and review these changes
git merge --no-ff 'origin/Mario/mutator_minstagib'
# please make sure this merge worked, and if not, fix merge conflicts and git
# commit BEFORE the next command
#
# also, THIS is the point to do final pre-merge testing
#
# use git reset --hard origin/master to bail out
git push && git push --delete origin 'Mario/mutator_minstagib'
Diffstat:
defaultXonotic.cfg | 2 +-
qcsrc/client/scoreboard.qc | 2 +-
qcsrc/common/notifications.qh | 2 +
qcsrc/server/autocvars.qh | 1 +
qcsrc/server/bot/aim.qc | 8 +-
qcsrc/server/cl_client.qc | 58 +----
qcsrc/server/cl_impulse.qc | 1 -
qcsrc/server/cl_physics.qc | 2 -
qcsrc/server/cl_player.qc | 13 +-
qcsrc/server/cl_weaponsystem.qc | 3 +-
qcsrc/server/defs.qh | 2 +-
qcsrc/server/g_damage.qc | 71 +-----
qcsrc/server/g_world.qc | 12 +-
qcsrc/server/miscfunctions.qc | 36 +--
qcsrc/server/mutators/base.qh | 23 ++
qcsrc/server/mutators/mutator_minstagib.qc | 412 ++++++++++++++++++++++++++++
qcsrc/server/mutators/mutator_vampire.qc | 1 +
qcsrc/server/mutators/mutators.qh | 1 +
qcsrc/server/progs.src | 1 +
qcsrc/server/t_items.qc | 231 ++--------------
qcsrc/server/teamplay.qc | 2 -
qcsrc/server/w_common.qc | 1 -
qcsrc/server/w_laser.qc | 13 +-
qcsrc/server/w_minstanex.qc | 103 +-------
qcsrc/server/waypointsprites.qc | 8 +-
vehicles.cfg | 4 +-
26 files changed, 496 insertions(+), 517 deletions(-)
Revision log:
commit f4e8e144a9c8e6f1774313edba5fc6c7ecfc2335
Merge: e163852 579290d
Author: Mario
Commit: Mario
Merge branch 'master' into Mario/mutator_minstagib
commit e163852e1147a86869024e2db1b6adb6d14fb340
Author: Mario
Commit: Mario
Make client minstagib check a local float (still buggy if both minsta & nex are available)
commit d4cdb8e85aa010fb6f4fc8092d7cedef86ef7fc2
Author: Mario
Commit: Mario
Don't give ammo for laser jumps
commit 28e97204cac96f7f4caf0a7524661a7c8302c71e
Author: Mario
Commit: Mario
Remove useless g_minstagib check
commit 79058b12f0ee3454f3801f68e4b2452038be3a80
Author: Mario
Commit: Mario
Move waypoint check to mutator (will add it back when we have a proper invisibility powerup)
commit 5ed1ee44ebd0da81274f98ee4086c6d1bbbe7087
Author: Mario
Commit: Mario
Lower minstagib extra lives to 1
commit 69e51ab7d82fb98e5437cc367ef7ca45e5c27602
Author: Mario
Commit: Mario
Attempt to remove more g_minstagib checks from the code
commit a64d8a6a5b0a3ed53934ee72229c64112233db5a
Author: Mario
Commit: Mario
Remove strength sound mutator hook
commit 97b8edd1e04d23094bc3735865d6caeae2d56738
Merge: 020b899 5ff2b40
Author: Mario
Commit: Mario
Merge branch 'master' into Mario/mutator_minstagib
commit 020b899e1b7d6afb03e0e7d0e84eb1281a339488
Author: Mario
Commit: Mario
Replace giveplayer entity with other
commit 4968518d1e161ce6d918550b15f38e4c8db4ffa7
Author: Mario
Commit: Mario
Fix broken cvar value
commit 845ba43115469fa741cc144a1426658d54d4534d
Author: Mario
Commit: Mario
Increase minstanex vehicle damage
commit 07a6b4de30a97074498119b037d755b47ec350f8
Author: Mario
Commit: Mario
Fix powerups
commit 65a655adcc9d72f9ab5db3cfeb4e75e1ff4ba8b6
Author: Mario
Commit: Mario
Remove useless health check
commit fa1538c9ca2b7b16b57124fb912fc7b48ffed73e
Author: Mario
Commit: Mario
Fix player not picking up ammo
commit 5b6514ad570d0210590f6fb10b6abd26df38cbd8
Merge: 5db892c 3dc4050
Author: Mario
Commit: Mario
Merge branch 'master' into Mario/mutator_minstagib
commit 5db892c4244fa01678787f3e1da7c9bce9c44029
Author: Mario
Commit: Mario
Fix player not dying from no ammo
commit 9be371a9f3d7ea7031efc0bacff9501dd0113551
Author: Mario
Commit: Mario
Fix compile errors
commit 8a875b45f0e8b3dfb8c6be5bce6fbca186f4f47f
Author: Mario
Commit: Mario
Move minstagib messages to the notifications system
commit b2c2d31803d0620b3af3cb1e792cfbd60732155f
Merge: a53768f 8ca52c0
Author: Mario
Commit: Mario
Merge branch 'master' into mario/mutator_minstagib
commit a53768f20ae1838a151d010919c8c4d4e4d47cc4
Author: Mario
Commit: Mario
Fix a missing mutator hook
commit a062291e28227d4fbe374c86d20a64b4a9245475
Author: Mario
Commit: Mario
Fix dying players not dropping their weapon & cleanup item filtering
commit 8ca366ebd48869569fbc18c9cd854b705e04e540
Merge: 4e6c8c5 9c13562
Author: Mario
Commit: Mario
Merge branch 'master' into mario/mutator_minstagib
commit 4e6c8c5fcb1b874a8c90f5f571471ff2993ce7dc
Author: Mario
Commit: Mario
Fix missing semi-colon
commit 2715ed146da68212d50bda553edd4c1f2caefe3e
Author: Mario
Commit: Mario
Fix bad use of if(void())
commit 8d75cc459c25d507dc336bdf46b3a257505567a2
Merge: 278f544 d8d184e
Author: Mario
Commit: Mario
Merge branch 'master' into mario/mutator_minstagib
commit 278f5440b4272f696c6b6e5bb9bb3139b8b53a11
Merge: 2edeb83 8d87869
Author: Mario
Commit: Mario
Merge branch 'master' into Mario/mutator_minstagib
commit 2edeb8354bb93aae319d75077a44c0fd0b4f6ca2
Author: Mario
Commit: Mario
Initial commit
User agreed to the GPLv2*.
Diff:
<pre>diff —git a/defaultXonotic.cfg b/defaultXonotic.cfg
index 2af290f..6d89059 100644
— a/defaultXonotic.cfg
**+ b/defaultXonotic.cfg
@ -374,7 +374,7
@ set g_powerups 1 “if set to 0 the strength and shield (invincibility) will not
set g_use_ammunition 1”if set to 0 all weapons have unlimited ammunition"
set g_pickup_items1 “if set to 0 all items (health, armor, ammo, weapons…) are removed from the map, if 1 they are forced to spawn”
set g_minstagib 0 “enable minstagib”
~~set g_minstagib_extralives 2 “how many extra lives you will get per powerup”
*set g_minstagib_extralives 1 “how many extra lives you will get per powerup”
set g_minstagib_ammo_start 10 “starting ammo”
set g_minstagib_ammo_drop 5 “how much ammo you’ll get for weapons or cells”
set g_minstagib_invis_alpha 0.15
diff —git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc
index 2ec7db0..69d9a3c 100644
— a/qcsrc/client/scoreboard.qc
**+ b/qcsrc/client/scoreboard.qc
@ -947,7 +947,6
@ float HUD_WouldDrawScoreboard {
return 0;
}
~~float g_minstagib;
float average_accuracy;
vector HUD_DrawScoreboardAccuracyStats
{
@ -962,6 +961,7
@ vector HUD_DrawScoreboardAccuracyStats
float fontsize = height * 1/3;
float weapon_height = height * 2/3;
float weapon_width = sbwidth / weapon_cnt;
- float g_minstagib = 0;
drawstring“), average_accuracy), hud_fontsize, ‘1 1 1’, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_y = 1.25 * hud_fontsize_y autocvar_scoreboard_border_thickness;
diff —git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh
index 67b5f24..310820c 100644
— a/qcsrc/common/notifications.qh
**+ b/qcsrc/common/notifications.qh
@ -514,6 +514,8
@ void Send_Notification_WOVA, "") MSG_CENTER_NOTIF, "") MSG_CENTER_NOTIF, *) + MSG_CENTER_NOTIF, "") + MSG_CENTER_NOTIF, "") MSG_CENTER_NOTIF, "") MSG_CENTER_NOTIF, "") MSG_CENTER_NOTIF, "") diff —git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 1febc23..ed1c560 100644 — a/qcsrc/server/autocvars.qh **+ b/qcsrc/server/autocvars.qh@ -891,6 +891,7
@ float autocvar_g_midair_shieldtime; float autocvar_g_minstagib_ammo_drop; float autocvar_g_minstagib_extralives; float autocvar_g_minstagib_speed_highspeed; *float autocvar_g_minstagib_invis_alpha; #define autocvar_g_mirrordamage cvar #define autocvar_g_mirrordamage_virtual cvar diff —git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index 3bff21e..a2b6e18 100644 — a/qcsrc/server/bot/aim.qc **+ b/qcsrc/server/bot/aim.qc@ -136,11 +136,13
@ float bot_shouldattack return FALSE; if return FALSE;
- if
- if
- return FALSE; if return FALSE;
- checkentity = e;
- if)
- return FALSE;
return TRUE;
}
diff —git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc
index b61fbfa..08d8ef2 100644
— a/qcsrc/server/cl_client.qc
**+ b/qcsrc/server/cl_client.qc
@ -387,8 +387,6
@ void PutObserverInServer
MUTATOR_CALLHOOK;
- minstagib_stop_countdown;
Portal_ClearAll;
if
@ -705,9 +703,6
@ void PutClientInServer
if
self.flags |= FL_NOTARGET;
self.takedamage = DAMAGE_AIM;
- if
- self.effects = EF_FULLBRIGHT;
- else
self.effects = 0;
self.effects |= EF_TELEPORT_BIT | EF_RESTARTANIM_BIT;
self.air_finished = time* 12;
@ -1776,55 +1771,7
@ void player_powerups Fire_ApplyDamage; Fire_ApplyEffect; - if
- {
- self.effects |= EF_FULLBRIGHT;
- if
- {
- play_countdown;
- if
- {
- self.alpha = default_player_alpha;
- self.exteriorweaponentity.alpha = default_weapon_alpha;
- self.items &=\ IT_STRENGTH; -\ //Send_Notification; -\ Send_Notification; -\ } -\ } -\ else -\ { -\ if\ -\ { -\ self.alpha\ =\ g_minstagib_invis_alpha; -\ self.exteriorweaponentity.alpha\ =\ g_minstagib_invis_alpha; -\ self.items\ |=\ IT_STRENGTH; -\ Send_Notification; -\ Send_Notification; -\ } -\ }
@ -2634,9 +2581,6
@\ void\ PlayerPreThink\
\ player_powerups;
\ }
-\ if\
-\ minstagib_ammocheck;
-\ if\
-\ {
-\ play_countdown;
-\ if\
-\ {
-\ self.items\ =\ self.items\ -\ ;
-\ //Send_Notification;
-\ Send_Notification;
-\ }
-\ }
-\ else
-\ {
-\ if\
-\ {
-\ self.items\ =\ self.items\ |\ IT_INVINCIBLE;
-\ Send_Notification;
-\ Send_Notification;
-\ }
-\ }
-\ }
-\ else\ //\ if\ we’re\ not\ in\ minstagib,\ continue.\ I\ added\ this\ else\ to\ replace\ the\ "return"\ which\ was\ here\ that\ broke\ the\ callhook\ for\ this\ function\ —\ This\ code\ is\ nasty.
+\ if\ not
\ {
\ if\
\ {
@ -94,7 +94,6
@\ void\ ImpulseCommands\
\ W_PreviousWeapon\ ;
\ break;
\ case\ 17:
-\ if\
\ W_ThrowWeapon,\ ‘0\ 0\ 0’,\ TRUE);
\ break;
\ case\ 18:
diff\ —git\ a/qcsrc/server/cl_physics.qc\ b/qcsrc/server/cl_physics.qc
index\ 6ddf7b6..f801281\ 100644
—\ a/qcsrc/server/cl_physics.qc
**+\ b/qcsrc/server/cl_physics.qc
@ -704,8 +704,6
@\ void\ SV_PlayerPhysics
\ WarpZone_PlayerPhysics_FixVAngle;
\ maxspd_mod\ =\ 1;
-\ if)
-\ maxspd_mod\ =\ autocvar_g_minstagib_speed_highspeed;
\ if
\ if
\ maxspd_mod=\ autocvar_g_nexball_basketball_carrier_highspeed;
diff\ —git\ a/qcsrc/server/cl_player.qc\ b/qcsrc/server/cl_player.qc
index\ 944db7e..4a5c8a0\ 100644
—\ a/qcsrc/server/cl_player.qc
**+\ b/qcsrc/server/cl_player.qc
@ -262,10 +262,6
@\ void\ player_anim\
\ void\ SpawnThrownWeapon\
\ {
-\ if
-\ if
-\ return;
\ if\
\ {
\ float\ button_pressed,\ force_respawn;
diff\ —git\ a/qcsrc/server/cl_impulse.qc\ b/qcsrc/server/cl_impulse.qc
index\ 529567a..b6a71c3\ 100644
—\ a/qcsrc/server/cl_impulse.qc
**+\ b/qcsrc/server/cl_impulse.qc
@ -391,17 +387,10
@\ void\ PlayerDamage\ /\ 16,\ self,\ attacker);
-\ if\
-\ {
*
\ v\ =\ healtharmor_applydamage;
\ take\ =\ v_x;
\ save\ =\ v_y;
-\ }
-\ else
-\ {
-\ save\ =\ 0;
-\ take\ =\ damage;
-\ }
\ if
\ {
diff\ —git\ a/qcsrc/server/cl_weaponsystem.qc\ b/qcsrc/server/cl_weaponsystem.qc
index\ afabe18..e961e29\ 100644
—\ a/qcsrc/server/cl_weaponsystem.qc
**+\ b/qcsrc/server/cl_weaponsystem.qc
@ -117,8 +117,7
@\ vector\ w_shotend;
\ .float\ prevstrengthsoundattempt;
\ void\ W_PlayStrengthSound\ //\ void\ W_PlayStrengthSound
\ {
-\ if
-\ &&\
*\ if
\ &&\ //\ prevent\ insane\ sound\ spam
\ ||\ ))
\ {
diff\ —git\ a/qcsrc/server/defs.qh\ b/qcsrc/server/defs.qh
index\ a7cd801..f57a7ab\ 100644
—\ a/qcsrc/server/defs.qh
**+\ b/qcsrc/server/defs.qh
@ -16,7 +16,7
@\ noref\ float\ require_spawnfunc_prefix;\ //\ if\ this\ float\ exists,\ only\ functions\ wi
\ //\ Globals
~~float\ g_cloaked,\ g_footsteps,\ g_jump_grunt,\ g_grappling_hook,\ g_midair,\ g_minstagib,\ g_pinata,\ g_norecoil,\ g_minstagib_invis_alpha,\ g_bloodloss;
float\ g_cloaked,\ g_footsteps,\ g_jump_grunt,\ g_grappling_hook,\ g_midair,\ g_minstagib,\ g_pinata,\ g_norecoil,\ g_bloodloss;
\ float\ g_warmup_limit;
\ float\ g_warmup_allguns;
\ float\ g_warmup_allow_timeout;
diff\ —git\ a/qcsrc/server/g_damage.qc\ b/qcsrc/server/g_damage.qc
index\ 3b72512..fbfe755\ 100644
—\ a/qcsrc/server/g_damage.qc
**+\ b/qcsrc/server/g_damage.qc
@ -660,12 +660,7
@\ void\ Damage\ //\ FIXME\ why\ is\ g_ca\ ruled\ out\ here?\ Why\ not\ just\ g_mirrordamage\ 0\ on\ CA\ servers?
\ mirrordamage\ =\ autocvar_g_mirrordamage\ *\ complainteamdamage;
\ mirrorforce\ =\ autocvar_g_mirrordamage\ *\ vlen;
-\ if
-\ {
-\ if
-\ damage\ =\ 0;
-\ }
-\ else\ if
\ if
\ damage\ =\ 0;
\ else
\ damage\ =\ autocvar_g_friendlyfire\ *\ damage;
@ -707,44 +702,6
@\ void\ Damage\
~~\ if\
-\ {
-\ if\ ||
-\ ||
-\ ||
-\ ||
-\ &&\ damage\ >\ 0\ &&\ damage\ <\ 100))
-\ {
-\ self\ =\ oldself;
-\ return;
-\ }
-\ if
-\ damage\ =\ 10000;
-\ if\ &&\ damage)
-\ {
-\ targ.armorvalue\ ~~=\ 1;
~~\ centerprint));
-\ damage\ =\ 0;
-\ targ.hitsound=\ 1;
-\ attacker.hitsound=\ 1;\ //\ TODO\ change\ this\ to\ a\ future\ specific\ hitsound\ for\ armor\ hit
-\ }
-\ if\ )
-\ {
-\ damage\ =\ 0;
-\ mirrordamage\ =\ 0;
-\ complainteamdamage\ =\ 0;
-\ if\
-\ {
-\ if\ &&\ )
-\ centerprint;
-\ force\ =\ ‘0\ 0\ 0’;
-\ //\ keep\ mirrorforce
-\ attacker\ =\ targ;
-\ }
-\ }
-\ }
\ if
\ {
\ float\ j;
@ -760,12 +717,16
@\ void\ Damage\ ;
\ damage\ =\ frag_damage;
+\ mirrordamage\ =\ frag_mirrordamage;
\ force\ =\ frag_force;
+\ if\ not
+\ {
\ //\ apply\ strength\ multiplier
-\ if\ &&\ !g_minstagib)
+\ if\
\ {
\ if
\ {
@ -780,8 +741,9
@\ void\ Damage\
+\ if\
\ damage\ =\ damage\ autocvar_g_balance_powerup_invincible_takedamage;
+\ }
\ if\
\ {
@ -823,13 +785,8
@\ void\ Damage\ )
\ {
\ if\ //\ don’t\ do\ this\ for\ vehicles
-\ if
\ if)
\ yoda\ =\ 1;
\ if\ not)
\ {
\ damage\ =\ g_weapondamagefactor;
@ -886,18 +843,6
@\ void\ Damage\
\ {
\ attacker\ =\ attacker_save;
-\ if
-\ if
-\ {
-\ //\ just\ lose\ extra\ LIVES,\ don’t\ kill\ the\ player\ for\ mirror\ damage
-\ if
-\ {
-\ attacker.armorvalue\ =\ attacker.armorvalue\ -\ 1;
-\ centerprint));
-\ attacker.hitsound\ *=\ 1;
-\ }
-\ mirrordamage\ =\ 0;
-\ }
\ force\ =\ normalize\ *\ mirrorforce;
\ Damage;
diff\ —git\ a/qcsrc/server/g_world.qc\ b/qcsrc/server/g_world.qc
index\ 25cd566..85ab359\ 100644
—\ a/qcsrc/server/g_world.qc
**+\ b/qcsrc/server/g_world.qc
@ -425,12 +425,9
@\ void\ cvar_changes_init
\ BADCVAR\ ("g_minstagib");
\ BADCVAR\ ("g_new_toys");
\ BADCVAR\ ("g_nix");
-\ if
-\ if
-\ yoda\ =\ 1;
\ }
\ }
\ }
#undef\ BADPREFIX
\ #undef\ BADCVAR
@ -713,10 +710,6
@\ void\ spawnfunc_worldspawn\
\ s\ =\ strcat;
\ //\ TODO\ to\ mutator\ system
-\ if
-\ s\ =\ strcat;
-\ if
-\ {
\ BADCVAR\ ("g_grappling_hook");
\ BADCVAR\ ("g_jetpack");
-\ }
*\
\
@ -936,9 +929,6
@\ void\ spawnfunc_worldspawn\
\ modname\ =\ cvar_string;
\ if\ !=\ cvar_defstring)
\ modname\ =\ cvar_string;
-\ //\ weird\ mutators\ that\ deserve\ to\ count\ as\ mod
-\ if
-\ modname\ =\ "MinstaGib";
\ //\ extra\ mutators\ that\ deserve\ to\ count\ as\ mod
\ MUTATOR_CALLHOOK;
diff\ —git\ a/qcsrc/server/miscfunctions.qc\ b/qcsrc/server/miscfunctions.qc
index\ 17a2682..ffaccfb\ 100644
—\ a/qcsrc/server/miscfunctions.qc
**+\ b/qcsrc/server/miscfunctions.qc
@ -824,27 +824,12
@\ void\ readplayerstartcvars
\ if\
\ {
-\ g_minstagib\ =\ 0;\ //\ incompatible
\ g_pinata\ =\ 0;\ //\ incompatible
\ g_weapon_stay\ =\ 0;\ //\ incompatible
\ WEPSET_COPY_AA;
\ if)
\ start_items\ |=\ IT_UNLIMITED_AMMO;
\ }
-\ else\ if\
-\ {
-\ g_pinata\ =\ 0;\ //\ incompatible
-\ g_weapon_stay\ =\ 0;\ //\ incompatible
-\ g_bloodloss\ =\ 0;\ //\ incompatible
-\ start_health\ =\ 100;
-\ start_armorvalue\ =\ 0;
-\ WEPSET_COPY_AW;
-\ g_minstagib_invis_alpha\ =\ cvar;
-\ start_items\ |=\ IT_UNLIMITED_SUPERWEAPONS;
-\ //\ TODO\ to\ mutator\ system
\ if
\ s\ =\ strcat;
\ if
@ -866,12 +851,7
@\ void\ readplayerstartcvars
\ if)
\ start_items\ |=\ IT_UNLIMITED_SUPERWEAPONS;\ //\ FIXME\ BAD\ BAD\ BAD\ BAD\ HACK,\ NEXBALL\ SHOULDN’T\ ABUSE\ PORTO’S\ WEAPON\ SLOT
-\ if
-\ {
-\ start_ammo_cells\ =\ cvar;
-\ start_ammo_fuel\ =\ cvar;
-\ }
-\ else\ if
*\ if
\ {
\ start_ammo_rockets\ =\ 999;
\ start_ammo_shells\ =\ 999;
@ -918,7 +898,7
@\ void\ readplayerstartcvars
\ WEPSET_COPY_AA;
\ WEPSET_COPY_AA;
-\ if\
*\ if\
\ {
\ warmup_start_ammo_shells\ =\ cvar;
\ warmup_start_ammo_cells\ =\ cvar;
@ -1005,8 +985,6
@\ float\ sv_taunt;
\ string\ GetGametype;\ //\ g_world.qc
\ void\ readlevelcvars
\ {
-\ g_minstagib\ =\ cvar;
-\ if\
-\ g_minstagib_invis_alpha\ =\ ~~1;
~~\ }
\ else
\ {
\ for\
\ //\ load\ ALL\ the\ mutators
\ if)
\ MUTATOR_ADD;
@ -1014,12 +992,13
@\ void\ readlevelcvars
\ MUTATOR_ADD;
\ if)
\ MUTATOR_ADD;
-\ if
-\ {
+\ if)
+\ MUTATOR_ADD;
\ if)
\ MUTATOR_ADD;
\ if)
\ MUTATOR_ADD;
+\ if)\ //\ TODO:\ nix\ support?
\ if)
\ MUTATOR_ADD;
\ if)
@ -1028,7 +1007,6
@\ void\ readlevelcvars
\ MUTATOR_ADD;\
\ if)
\ MUTATOR_ADD;
-\ }
\ //\ is\ this\ a\ mutator?\ is\ this\ a\ mode?
\ if)
@ -1053,6 +1031,8
@\ void\ readlevelcvars
\ g_bugrigs_speed_pow\ =\ cvar;
\ g_bugrigs_steer\ =\ cvar;
+\ g_minstagib\ =\ cvar;
+
\ g_touchexplode\ =\ cvar;
\ g_touchexplode_radius\ =\ cvar;
\ g_touchexplode_damage\ =\ cvar;
@ -1081,7 +1061,7
@\ void\ readlevelcvars
\ g_warmup_allguns\ =\ cvar;
\ g_warmup_allow_timeout\ =\ cvar;
-\ if\ ||\ g_arena\ ||\ g_assault\ ||\ cvar)
+\ if\ ||\ g_arena\ ||\ g_minstagib\ ||\ g_assault\ ||\ cvar)
\ inWarmupStage\ =\ 0;\ //\ these\ modes\ cannot\ work\ together,\ sorry
\ g_pickup_respawntime_weapon\ =\ cvar;
diff\ —git\ a/qcsrc/server/mutators/base.qh\ b/qcsrc/server/mutators/base.qh
index\ 35b2e65..0b07a93\ 100644
—\ a/qcsrc/server/mutators/base.qh
**+\ b/qcsrc/server/mutators/base.qh
@ -97,6 +97,11
@\ MUTATOR_HOOKABLE;
\ //\ INPUT,\ OUTPUT:
\ string\ ret_string;
*MUTATOR_HOOKABLE;
*\ //\ called\ every\ frame
+\ //\ customizes\ the\ waypoint\ for\ spectators
+\ //\ INPUT:\ self\ =\ waypoint,\ other\ =\ player,\ other.enemy\ =\ spectator
+
\ MUTATOR_HOOKABLE;
\ //\ checks\ if\ the\ current\ item\ may\ be\ spawned\
\ //\ return\ error\ to\ request\ removal
@ -150,6 +155,7
@\ MUTATOR_HOOKABLE;
\ float\ frag_deathtype;
\ //\ INPUT,\ OUTPUT:
\ float\ frag_damage;
+\ float\ frag_mirrordamage;
\ vector\ frag_force;
\ MUTATOR_HOOKABLE;
@ -221,6 +227,23
@\ MUTATOR_HOOKABLE;
\ //\ IN+OUT
\ string\ ret_string;
*MUTATOR_HOOKABLE;
*\ //\ called\ when\ an\ item\ is\ about\ to\ respawn
+\ //\ INPUT+OUTPUT:
+\ string\ item_name;
+\ vector\ item_color;
+\
*MUTATOR_HOOKABLE;
*\ //\ called\ when\ an\ item\ is\ given\ to\ a\ player
+\ entity\ giveitem;
+\ float\ player_wswitch;
+\ float\ player_pickedup;
+\
*MUTATOR_HOOKABLE;
*\ //\ called\ when\ a\ bot\ checks\ a\ target\ to\ attack
+\ //\ INPUT
+\ entity\ checkentity;
+
\ MUTATOR_HOOKABLE;
\ //\ called\ whenever\ a\ player\ goes\ through\ a\ portal\ gun\ teleport
\ //\ allows\ you\ to\ strip\ a\ player\ of\ an\ item\ if\ they\ go\ through\ the\ teleporter\ to\ help\ prevent\ cheating
diff\ —git\ a/qcsrc/server/mutators/mutator_minstagib.qc\ b/qcsrc/server/mutators/mutator_minstagib.qc
new\ file\ mode\ 100644
index\ 0000000..8388607
—\ /dev/null
**+\ b/qcsrc/server/mutators/mutator_minstagib.qc
@ -0,0 +1,412
@
*void\ spawnfunc_item_minst_cells\
*{
+\ if\ not\ {\ remove;\ return;\ }
+\ if\ not
+\ self.ammo_cells\ =\ autocvar_g_minstagib_ammo_drop;
+\
+\ StartItem\ ;
*}
*
*void\ minstagib_health_mega
*{
+\ self.max_health\ =\ 1;
+\ StartItem\ ;
*}
*
*.float\ minstagib_nextthink;
*.float\ minstagib_needammo;
*void\ minstagib_stop_countdown
*{
+\ if\
+\ return;
+\ Kill_Notification;
+\ e.minstagib_needammo\ =\ FALSE;
*}
*void\ minstagib_ammocheck
*{
*\ if\
+\ return;
+
+\ if\
+\ minstagib_stop_countdown;
+\ else\ if\ )
+\ minstagib_stop_countdown;
+\ else
+\ {
+\ self.minstagib_needammo\ =\ TRUE;
+\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Send_Notification;
+\ Damage;
+\ Send_Notification;
+\ }
+\ else\ if\
+\ {
+\ Send_Notification;
+\ Damage;
+\ }
+\ }
+\ self.minstagib_nextthink\ =\ time\ +\ 1;
*}
*
*MUTATOR_HOOKFUNCTION
*{
+\ if
+\ return\ TRUE;
+\
+\ return\ FALSE;
*}
*
*MUTATOR_HOOKFUNCTION
*{
+\ minstagib_stop_countdown;
+\ return\ FALSE;
*}
*
*MUTATOR_HOOKFUNCTION
*{
+\ self.effects\ |=\ EF_FULLBRIGHT;
+\ return\ FALSE;
*}
*
*MUTATOR_HOOKFUNCTION
*{
+\ minstagib_ammocheck;
+\ return\ FALSE;
*}
*
*MUTATOR_HOOKFUNCTION
*{
+\ if\ not
+\ self.effects\ |=\ EF_FULLBRIGHT;
+
+\ if\
+\ {
+\ play_countdown;
+\ if\
+\ {
+\ self.alpha\ =\ default_player_alpha;
+\ self.exteriorweaponentity.alpha\ =\ default_weapon_alpha;
+\ self.items\ &= IT_STRENGTH;
- Send_Notification;
- }
- }
- else
- {
- if
- {
- self.alpha = autocvar_g_minstagib_invis_alpha;
- self.exteriorweaponentity.alpha = autocvar_g_minstagib_invis_alpha;
- self.items |= IT_STRENGTH;
- Send_Notification;
- Send_Notification;
- }
- }
- if
- {
- play_countdown;
- if
- {
- self.items &~= IT_INVINCIBLE;
- Send_Notification;
- }
- }
- else
- {
- if
- {
- self.items |= IT_INVINCIBLE;
- Send_Notification;
- Send_Notification;
- }
- }
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- if
- self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_minstagib_speed_highspeed;
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- damage_save = 0;
- //damage_take = frag_damage; // frag_damage isn’t even set here?!
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- if
- return FALSE;
- return TRUE; *}
*MUTATOR_HOOKFUNCTION *{
- if && IS_PLAYER)
- frag_damage = 0;
- if)
- {
- if ||
- ||
- ||
- )
- {
- frag_damage = 0;
- }
- if && frag_damage)
- {
- frag_target.armorvalue ~~= 1;
- Send_Notification;
- frag_damage = 0;
- frag_target.hitsound *= 1;
- frag_attacker.hitsound *= 1; // TODO change this to a future specific hitsound for armor hit
- }
- if )
- {
- frag_damage = 0;
- frag_mirrordamage = 0;
- if
- {
- if && IS_PLAYER)
- Send_Notification;
- frag_force = ‘0 0 0’;
- // keep mirrorfrag_force
- frag_attacker = frag_target;
- }
- }
- }
- if
- {
- // just lose extra LIVES, don’t kill the player for mirror damage
- if
- {
- frag_attacker.armorvalue = frag_attacker.armorvalue~~ 1;
- Send_Notification;
- frag_attacker.hitsound *= 1;
- }
- frag_mirrordamage = 0;
- }
- if
- yoda = 1;
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- start_ammo_cells = cvar;
- start_health = 100;
- start_armorvalue = 0;
- WEPSET_COPY_AW;
- start_items |= IT_UNLIMITED_SUPERWEAPONS;
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- if
- return TRUE; // no normal cells?
- if
- {
- self.ammo_cells = autocvar_g_minstagib_ammo_drop;
- return FALSE;
- }
- if
- {
- entity e = spawn;
- setorigin;
- entity oldself;
- oldself = self;
- self = e;
- spawnfunc_item_minst_cells;
- self = oldself;
- return TRUE;
- }
- if
- return FALSE;
- if
- self.ammo_cells = autocvar_g_minstagib_ammo_drop;
- if
- return FALSE;
- return TRUE; *}
*MUTATOR_HOOKFUNCTION *{
- entity e = WaypointSprite_getviewentity;
- // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
- // but only apply this to real players, not to spectators
- if && && )
- if)
- return TRUE;
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- switch
- {
- case IT_STRENGTH: item_name = "item-invis"; item_color = ‘0 0 1’; break;
- case IT_NAILS: item_name = "item-extralife"; item_color = ‘1 0 0’; break;
- case IT_INVINCIBLE: item_name = "item-speed"; item_color = ‘1 0 1’; break;
- }
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- if
- {
- // play some cool sounds ;)
- if )
- {
- if
- Send_Notification;
- else if
- Send_Notification;
- }
- if
- other.health = 100;
- player_pickedup = TRUE;
- }
- if
- {
- other.armorvalue = bound;
- sprint;
- player_pickedup = TRUE;
- }
- return TRUE; *}
*MUTATOR_HOOKFUNCTION *{
- if not { return FALSE; }
- if not
- return FALSE;
- entity e = spawn;
- if < 0.3)
- e.think = spawnfunc_item_strength;
- else if < 0.6)
- e.think = minstagib_health_mega;
- else
- e.think = spawnfunc_item_invincible;
- e.nextthink = time + 0.1;
- e.spawnflags = self.spawnflags;
- e.noalign = self.noalign;
- setorigin;
- return TRUE; *}
*MUTATOR_HOOKFUNCTION *{
- ret_string = strcat;
- return FALSE; *}
*MUTATOR_HOOKFUNCTION *{
- ret_string = strcat;
- return FALSE; *}
*MUTATOR_DEFINITION *{
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- MUTATOR_HOOK;
- return FALSE;
}
diff —git a/qcsrc/server/mutators/mutator_vampire.qc b/qcsrc/server/mutators/mutator_vampire.qc
index 40a925b..1aa293b 100644
— a/qcsrc/server/mutators/mutator_vampire.qc
**+ b/qcsrc/server/mutators/mutator_vampire.qc
@ -5,6 +5,7
@ MUTATOR_HOOKFUNCTION if { // minstagib: each hit means1 ammo - if
frag_attacker.ammo_cells *= 2; // note: 1 cell was deducted for the shot
}
else
diff —git a/qcsrc/server/mutators/mutators.qh b/qcsrc/server/mutators/mutators.qh
index 4bdcbb2..1481520 100644
— a/qcsrc/server/mutators/mutators.qh
**+ b/qcsrc/server/mutators/mutators.qh
@ -15,5 +15,6
@ MUTATOR_DECLARATION; MUTATOR_DECLARATION; MUTATOR_DECLARATION; MUTATOR_DECLARATION; *MUTATOR_DECLARATION; MUTATOR_DECLARATION; diff —git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index f33be85..3664b6b 100644 — a/qcsrc/server/progs.src **+ b/qcsrc/server/progs.src@ -231,6 +231,7
@ mutators/mutator_spawn_near_teammate.qc mutators/mutator_physical_items.qc mutators/sandbox.qc mutators/mutator_superspec.qc *mutators/mutator_minstagib.qc ../warpzonelib/anglestransform.qc ../warpzonelib/mathlib.qc diff —git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 392c05c..45698f1 100644 — a/qcsrc/server/t_items.qc **+ b/qcsrc/server/t_items.qc@ -271,11 +271,6
@ float ItemSend float have_pickup_item {
- // minstagib: only allow filtered items
- if
- if
- return FALSE;
if
{
if
@ -444,9 +439,10
@ void Item_Show
void Item_Respawn
{
Item_Show;
- if
- // this is ugly…
- if sound ; // play respawn sound
- else if
- else if
sound ; // play respawn sound
else
sound ; // play respawn sound
@ -473,28 +469,18
@ void Item_RespawnCountdown string name; vector rgb = ‘1 0 1’; name = string_null;
- if
- {
- switch
- {
- case IT_STRENGTH: name = "item-invis"; rgb = ‘0 0 1’; break;
- case IT_NAILS: name = "item-extralife"; rgb = ‘1 0 0’; break;
- case IT_INVINCIBLE: name = "item-speed"; rgb = ‘1 0 1’; break;
- }
- }
- else
- {
- switch
- {
- case IT_STRENGTH: name = "item-strength"; rgb = ‘0 0 1’; break;
- case IT_INVINCIBLE: name = "item-shield"; rgb = ‘1 0 1’; break;
- }
- } switch { case IT_FUEL_REGEN: name = "item-fuelregen"; rgb = ‘1 0.5 0’; break; case IT_JETPACK: name = "item-jetpack"; rgb = ‘0.5 0.5 0.5’; break;
- case IT_STRENGTH: name = "item-strength"; rgb = ‘0 0 1’; break;
- case IT_INVINCIBLE: name = "item-shield"; rgb = ‘1 0 1’; break; }
- item_name = name;
- item_color = rgb;
- MUTATOR_CALLHOOK;
- name = item_name;
- rgb = item_color;
if
{
entity wi = get_weaponinfo;
@ -614,72 +600,6
@ float Item_GiveTo // if nothing happens to player, just return without taking the item pickedup = FALSE; *switchweapon = FALSE;
- if
- {
- float prevcells = player.ammo_cells;
- pickedup |= Item_GiveAmmoTo;
- pickedup |= Item_GiveAmmoTo;
- if
- {
- *switchweapon = TRUE;
- // play some cool sounds ;)
- if CLIENTTYPE_REAL)
-
{
-
if(player.health \<= 5)
-
Send\_Notification(NOTIF\_ONE, player, MSG\_ANNCE, ANNCE\_MINSTAGIB\_LASTSECOND);
-
else if(player.health \< 50)
-
Send\_Notification(NOTIF\_ONE, player, MSG\_ANNCE, ANNCE\_MINSTAGIB\_NARROWLY);
-
}
-
// sound not available
-
// else if(item.items IT\_CELLS)
- // AnnounceTo;
- if )
- W_GiveWeapon ;
- player.health = 100;
- }
- if) & IT_PICKUPMASK))
- {
- pickedup = TRUE;
- player.items |= it;
- sprint );
- }
- // extralife powerup
- if
- {
- pickedup = TRUE;
- // sound not available
- // AnnounceTo;
- player.armorvalue = bound;
- sprint;
- }
- // invis powerup
- if
- {
- pickedup = TRUE;
- // sound not available
- // AnnounceTo;
- player.strength_finished = max + autocvar_g_balance_powerup_strength_time;
- }
- // speed powerup
- if
- {
- pickedup = TRUE;
- // sound not available
- // AnnounceTo;
- player.invincible_finished = max + autocvar_g_balance_powerup_invincible_time;
- }
- }
- else
- {
// in case the player has autoswitch enabled do the following:
// if the player is using their best weapon before items are given, they
// probably want to switch to an even better weapon after items are given
@ -735,9 +655,17
@ float Item_GiveTo pickedup = TRUE; player.superweapons_finished = max + item.superweapons_finished; } - } :skip
- other = player;
- giveitem = item;
- player_wswitch =*switchweapon;
- player_pickedup = pickedup;
- MUTATOR_CALLHOOK(Item_GiveTo);
- _switchweapon = player_wswitch;
- pickedup = player_pickedup;
// always eat teamed entities
if(item.team)
pickedup = TRUE;
@ -1152,9 +1080,9
@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
precache_sound (self.item_pickupsound);
precache_sound (”misc/itemrespawncountdown.wav“);
- if(!g_minstagib && itemid IT_STRENGTH)
-
if(itemid IT\_STRENGTH)
precache_sound (”misc/strength_respawn.wav“);
- else if(!g_minstagib && itemid IT_INVINCIBLE)
-
else if(itemid IT\_INVINCIBLE)
precache_sound (”misc/shield_respawn.wav“);
else
precache_sound (”misc/itemrespawn.wav“);
@ -1224,69 +1152,6
@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
}
}
~~/* replace items in minstagib
~~ * IT_STRENGTH = invisibility
- * IT_NAILS = extra lives
- * IT_INVINCIBLE = speed
- **/ ~~void minstagib_items // will be deleted soon. ~~{
- float rnd;
- self.classname = "minstagib"; // …?
- // replace rocket launchers and nex guns with ammo cells
- if
- {
- self.ammo_cells = autocvar_g_minstagib_ammo_drop;
- StartItem ;
- return;
- }
- // randomize
- rnd = random** 3;
- if (rnd <= 1)
- itemid = IT_STRENGTH;
- else if (rnd <= 2)
- itemid = IT_NAILS;
- else
- itemid = IT_INVINCIBLE;
- // replace with invis
- if (itemid IT_STRENGTH)
- {
-
if(!self.strength\_finished)
-
self.strength\_finished = autocvar\_g\_balance\_powerup\_strength\_time;
-
StartItem ("models/items/g\_strength.md3",
-
"misc/powerup.wav", g\_pickup\_respawntime\_powerup, g\_pickup\_respawntimejitter\_powerup,
-
"Invisibility", IT\_STRENGTH, 0, FL\_POWERUP, generic\_pickupevalfunc, BOT\_PICKUP\_RATING\_MID);
- }
- // replace with extra lives
- if (itemid IT_NAILS)
- {
- self.max_health = 1;
- StartItem (”models/items/g_h100.md3“, -”misc/megahealth.wav“, g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, -”Extralife“, IT_NAILS, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
- }
- // replace with speed
- if (itemid IT_INVINCIBLE)
- {
-
if(!self.invincible\_finished)
-
self.invincible\_finished = autocvar\_g\_balance\_powerup\_invincible\_time;
-
StartItem ("models/items/g\_invincible.md3",
-
"misc/powerup\_shield.wav", g\_pickup\_respawntime\_powerup, g\_pickup\_respawntimejitter\_powerup,
-
"Speed", IT\_INVINCIBLE, 0, FL\_POWERUP, generic\_pickupevalfunc, BOT\_PICKUP\_RATING\_MID);
- } -}
-float minst_no_auto_cells; -void minst_remove_item (void) {
- if(minst_no_auto_cells)
-
remove(self);
-}
float weaponswapping; float internalteam;
@@ -1425,11 +1290,6 @@ void weapon_defaultspawnfunc(float wpn) if(self.team) f |= FL_NO_WEAPON_STAY;
- // stupid minstagib hack, don't ask
- if(g_minstagib)
-
if(self.ammo\_cells)
-
self.ammo\_cells = autocvar\_g\_minstagib\_ammo\_drop;
- StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapon, f, weapon_pickupevalfunc, e.bot_pickupbasevalue); if (self.modelindex) // don't precache if self was removed weapon_action(e.weapon, WR_PRECACHE); @@ -1458,37 +1318,16 @@ void spawnfunc_weapon_shotgun (void) {
void spawnfunc_weapon_nex (void) {
- if (g_minstagib)
- {
-
minstagib\_items(IT\_CELLS);
-
self.think = minst\_remove\_item;
-
self.nextthink = time;
-
return;
- } weapon_defaultspawnfunc(WEP_NEX); }
void spawnfunc_weapon_minstanex (void) {
- if (g_minstagib)
- {
-
minstagib\_items(IT\_CELLS);
-
self.think = minst\_remove\_item;
-
self.nextthink = time;
-
return;
- } weapon_defaultspawnfunc(WEP_MINSTANEX); }
void spawnfunc_weapon_rocketlauncher (void) {
- if (g_minstagib)
- {
-
minstagib\_items(IT\_CELLS); // replace rocketlauncher with cells
-
self.think = minst\_remove\_item;
-
self.nextthink = time;
-
return;
- } weapon_defaultspawnfunc(WEP_ROCKET_LAUNCHER); }
@@ -1616,9 +1455,6 @@ void spawnfunc_item_health_large (void) { }
void spawnfunc_item_health_mega (void) {
- if(g_minstagib) {
-
minstagib\_items(IT\_NAILS);
- } else { if(!self.max_health) self.max_health = g_pickup_healthmega_max; if(!self.health) @@ -1626,7 +1462,6 @@ void spawnfunc_item_health_mega (void) { if(!self.pickup_anyway) self.pickup_anyway = g_pickup_healthmega_anyway; StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", g_pickup_respawntime_long, g_pickup_respawntimejitter_long, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
- } }
// support old misnamed entities @@ -1637,34 +1472,16 @@ void spawnfunc_item_health25() { spawnfunc_item_health_medium(); } void spawnfunc_item_health100() { spawnfunc_item_health_mega(); }
void spawnfunc_item_strength (void) {
- if(g_minstagib) {
-
minstagib\_items(IT\_STRENGTH);
- } else { precache_sound("weapons/strength_fire.wav"); if(!self.strength_finished) self.strength_finished = autocvar_g_balance_powerup_strength_time; StartItem ("models/items/g_strength.md3", "misc/powerup.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Strength Powerup", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
- } }
void spawnfunc_item_invincible (void) {
- if(g_minstagib) {
-
minstagib\_items(IT\_INVINCIBLE);
- } else { if(!self.invincible_finished) self.invincible_finished = autocvar_g_balance_powerup_invincible_time; StartItem ("models/items/g_invincible.md3", "misc/powerup_shield.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup, "Shield", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
- } -}
-void spawnfunc_item_minst_cells (void) {
- if (g_minstagib)
- {
-
minst\_no\_auto\_cells = TRUE;
-
minstagib\_items(IT\_CELLS);
- }
- else
-
remove(self);
}
// compatibility: @@ -2156,12 +1973,6 @@ float GiveItems(entity e, float beginarg, float endarg) if(WEPSET_CONTAINS_ANY_EA(self, WEPBIT_SUPERWEAPONS)) e.superweapons_finished = autocvar_g_balance_superweapons_time;
-
if (g_minstagib)
-
{
-
e.health = bound(0, e.health, 100);
-
e.armorvalue = bound(0, e.armorvalue, 999);
-
}
-
if(e.strength_finished <= 0) e.strength_finished = 0; else diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 6608fc9..cefcc32 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -276,8 +276,6 @@ string getwelcomemessage(void) MUTATOR_CALLHOOK(BuildMutatorsPrettyString); modifications = ret_string;
-
if(g_minstagib)
-
modifications = strcat(modifications, ", MinstaGib");
if(g_weaponarena) { if(g_weaponarena_random) diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 2e0c1e8..ad7cef8 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -11,7 +11,6 @@ void W_GiveWeapon (entity e, float wep) oldself = self; self = e;
-
if not(g_minstagib) if(other.classname ”player") { Send_Notification; } diff —git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 69dcb17..f2a4ba2 100644 — a/qcsrc/server/w_laser.qc **+ b/qcsrc/server/w_laser.qc
@ -34,19 +34,11
@ void W_Laser_Attack entity missile; vector s_forward; float a; -
float nodamage;
-
if // minstanex shot
-
nodamage = g_minstagib;
-
else
-
nodamage = FALSE; a = autocvar_g_balance_laser_primary_shotangle; s_forward = v_forward * cos* v_up * sin;
-
if
-
W_SetupShot_Dir ;
-
else if
- if
W_SetupShot_Dir ;
else
W_SetupShot_Dir ;
@ -56,11 +48,8
@ void W_Laser_Attack missile.owner = missile.realowner = self; missile.classname = “laserbolt”; missile.dmg = 0; ~~ if
- { missile.bot_dodge = TRUE; missile.bot_dodgerating = autocvar_g_balance_laser_primary_damage;
- }
PROJECTILE_MAKETRIGGER;
missile.projectiledeathtype = WEP_LASER;
diff —git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc
index b34d66b..45deff1 100644
— a/qcsrc/server/w_minstanex.qc
**+ b/qcsrc/server/w_minstanex.qc
@ -16,13 +16,6
@ void W_MinstaNex_Attack damage_goodhits = 0; FireRailgunBullet ; - if
- {
- if
- Send_Notification;
- }
- else
- {
if
Send_Notification;
if
@ -30,7 +23,6
@ void W_MinstaNex_Attack Send_Notification; damage_goodhits = 0; // only every second time } - }
self.minstanex_lasthit = damage_goodhits;
@ -72,95 +64,7
@ void W_MinstaNex_Attack else WarpZone_TrailParticles, w_shotorg, v); - if
- W_DecreaseAmmo;
- else
- W_DecreaseAmmo; ~~} ~~
~~.float minstagib_nextthink; ~~.float minstagib_needammo; ~~void minstagib_stop_countdown ~~{
- if
- return;
- Kill_Notification;
- e.minstagib_needammo = FALSE; ~~} ~~void minstagib_ammocheck ~~{ ~~ if
- return;
- if )
- minstagib_stop_countdown;
- else if )
- {
- minstagib_stop_countdown;
- self.health = 100;
- }
- else
- {
- self.minstagib_needammo = TRUE;
- if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Damage;
- Send_Notification;
- }
- else if
- {
- Send_Notification;
- Damage;
- Send_Notification;
- }
- else if
- {
- Send_Notification;
- Damage;
- }
- }
- self.minstagib_nextthink = time* 1;
- W_DecreaseAmmo ? 1 : autocvar_g_balance_minstanex_ammo), autocvar_g_balance_minstanex_reload_ammo);
}
void spawnfunc_weapon_minstanex ; // defined in t_items.qc
@ -171,10 +75,7
@ float w_minstanex float minstanex_ammo; // now multiple WR_s use this ~~ if
- minstanex_ammo = 1;
- else
- minstanex_ammo = autocvar_g_balance_minstanex_ammo;
- minstanex_ammo = ((g_minstagib) ? 1 : autocvar_g_balance_minstanex_ammo);
if (req WR_AIM) { diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 0e6f216..c692b6e 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -238,14 +238,8 @@ float WaypointSprite_Customize() entity e; e = WaypointSprite_getviewentity(other);
- // as a GENERAL rule:
- // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
- // but only apply this to real players, not to spectators
- if(g_minstagib && (self.owner.flags & FL_CLIENT) && (self.owner.items & IT_STRENGTH) && (e other))
- {
- if(!WaypointSprite_isteammate(self.owner, e))
- if(MUTATOR_CALLHOOK(CustomizeWaypoint)) return FALSE;
- }
return self.waypointsprite_visible_for_player(e);
}
diff —git a/vehicles.cfg b/vehicles.cfg
index 4030c64..d28aa4c 100644
— a/vehicles.cfg
**+ b/vehicles.cfg
@ -13,7 +13,7
@ set g_vehicle_bumblebee 1
set g_vehicles_crush_dmg 70
set g_vehicles_crush_force 50
-set cl_vehicles_hudscale 0.5way
*set cl_vehicles_hudscale 0.5
set g_vehicles_delayspawn 1
set g_vehicles_delayspawn_jitter 10
@ -21,6 +21,6
@ set g_vehicles_delayspawn_jitter 10
set g_vehicles_nex_damagerate 0.5
set g_vehicles_uzi_damagerate 0.65
set g_vehicles_rifle_damagerate 1
-set g_vehicles_minstanex_damagerate 0.001
*set g_vehicles_minstanex_damagerate 0.007
set g_vehicles_tag_damagerate 2