]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Survival: Added ability to use custom player templates.
authorLyberta <lyberta@lyberta.net>
Thu, 27 Jul 2017 23:28:05 +0000 (02:28 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 27 Jul 2017 23:28:05 +0000 (02:28 +0300)
qcsrc/server/mutators/mutator/gamemode_survival.qc
survival.cfg

index 9756ac2fe44f14f18dd90f9713ae93be71cda2f3..c4267d24ceec8660f7281d0f51f59b123f386503 100644 (file)
@@ -265,17 +265,17 @@ string Surv_GetPlayerTemplate(entity player)
                                case SURVIVAL_ROLE_NONE:
                                case SURVIVAL_ROLE_PLAYER:
                                {
-                                       return "surv_attacker";
+                                       return cvar_string("g_surv_attacker_template");
                                }
                                case SURVIVAL_ROLE_CANNON_FODDER:
                                {
-                                       return "surv_cannon_fodder";
+                                       return cvar_string("g_surv_cannon_fodder_template");
                                }
                        }
                }
                case surv_defenderteam:
                {
-                       return "surv_defender";
+                       return cvar_string("g_surv_defender_template");
                }
        }
        return "default";
index b0deec62937d5bd7d4f30e028be9cac4a23e9dfd..bfb82ba6086dc6b801461a528374b774536e3d2d 100644 (file)
@@ -22,6 +22,10 @@ set g_surv_team_size 4 "How much players are allowed in teams (excluding cannon
 set g_surv_stealth 0 "If set, defenders will not be shown on the radar"
 set g_surv_spectate_enemies 0 "Whether to allow spectating enemy players while dead"
 
+set g_surv_attacker_template "surv_attacker" "Player template of attackers"
+set g_surv_defender_template "surv_defender" "Player template of defenders"
+set g_surv_attacker_template "surv_cannon_fodder" "Player template of cannon fodder"
+
 set g_surv_attacker_force_overkill_models 0 "Whether to force overkill player models for attackers"
 set g_surv_defender_force_overkill_models 1 "Whether to force overkill player models for defenders"
 set g_surv_cannon_fodder_force_overkill_models 0 "Whether to force overkill player models for cannon fodder"