Skip to content

Commit f773942

Browse files
committed
allow change class in shop during warmup
TODO: need fix offsets
1 parent 880d2dc commit f773942

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Entities/Common/Respawning/OneClassAvailable.as

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ void onInit(CBlob@ this)
2828

2929
void GetButtonsFor(CBlob@ this, CBlob@ caller)
3030
{
31+
CRules@ rules = getRules();
32+
3133
if (!canSeeButtons(this, caller) || !this.exists(req_class)) return;
3234

3335
string cfg = this.get_string(req_class);
3436
if (canChangeClass(this, caller) && caller.getName() != cfg)
3537
{
3638
if (caller.getPlayer() is null) return;
3739

38-
if (getRules().get_string("ROLE_" + caller.getPlayer().getUsername()) == "builder")
40+
if (rules.isWarmup())
3941
{
4042
CBitStream params;
4143
write_classchange(params, caller.getNetworkID(), cfg);

0 commit comments

Comments
 (0)