Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / offhand_blaster / sv_offhand_blaster.qc
1 string autocvar_g_offhand_blaster;
2
3 REGISTER_MUTATOR(offhand_blaster, expr_evaluate(autocvar_g_offhand_blaster));
4
5 MUTATOR_HOOKFUNCTION(offhand_blaster, BuildMutatorsString)
6 {
7         M_ARGV(0, string) = strcat(M_ARGV(0, string), ":offhand_blaster");
8 }
9
10 MUTATOR_HOOKFUNCTION(offhand_blaster, BuildMutatorsPrettyString)
11 {
12         M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Offhand blaster");
13 }
14
15 MUTATOR_HOOKFUNCTION(offhand_blaster, BuildGameplayTipsString)
16 {
17     M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3offhand blaster^8 is enabled, press 'e' to use it\n");
18 }
19
20 MUTATOR_HOOKFUNCTION(offhand_blaster, PlayerSpawn)
21 {
22         entity player = M_ARGV(0, entity);
23         player.offhand = OFFHAND_BLASTER;
24 }