Skip to content

Commit

Permalink
fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute committed Jul 8, 2023
1 parent e0b2651 commit 0d7a72c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 128 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
spcomp -i ./ rrm_charge.sp
spcomp -i ./ rrm_explode.sp
spcomp -i ./ rrm_fire.sp
spcomp -i ./ rrm_gas.sp
spcomp -i ./ rrm_jarate.sp
spcomp -i ./ rrm_marked.sp
spcomp -i ./ rrm_medieval.sp
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
spcomp -i ./ rrm_charge.sp
spcomp -i ./ rrm_explode.sp
spcomp -i ./ rrm_fire.sp
spcomp -i ./ rrm_gas.sp
spcomp -i ./ rrm_jarate.sp
spcomp -i ./ rrm_marked.sp
spcomp -i ./ rrm_medieval.sp
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ Additional modifiers for the [RRM](https://forums.alliedmods.net/showthread.php?
|`rrm_fire_min`|`0.1`|Min fire chance|
|`rrm_fire_max`|`1.0`|Max fire chance|
|`rrm_fire_duration`|`3.0`|Fire duration|
|`rrm_gas_min`|`0.1`|Min gas chance|
|`rrm_gas_max`|`1.0`|Max gas chance|
|`rrm_gas_duration`|`3.0`|Gas duration|
|`rrm_jarate_min`|`0.1`|Min jarate chance|
|`rrm_jarate_max`|`1.0`|Max jarate chance|
|`rrm_jarate_duration`|`3.0`|Jarate duration|
Expand Down
120 changes: 0 additions & 120 deletions rrm_gas.sp

This file was deleted.

14 changes: 11 additions & 3 deletions rrm_resize.sp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public void OnPluginStart()
gMin = cMin.FloatValue;
gMax = cMax.FloatValue;

HookEvent("player_spawn", OnPlayerSpawn, EventHookMode_Post);

if(RRM_IsRegOpen())
RegisterModifiers();

Expand Down Expand Up @@ -71,12 +73,20 @@ public void OnConvarChanged(Handle convar, char[] oldValue, char[] newValue)
gMax = fNewValue;
}

public Action OnPlayerSpawn(Handle event, const char[] name, bool dontBroadcast)
{
if(!gEnabled)
return Plugin_Continue;
int i = GetClientOfUserId(GetEventInt(event, "userid"));
SetEntPropFloat(i, Prop_Send, "m_flModelScale", gSize);
return Plugin_Continue;
}

public void OnClientPostAdminCheck(int i)
{
if(!gEnabled)
return;
SetEntPropFloat(i, Prop_Send, "m_flModelScale", gSize);
SetEntPropFloat(i, Prop_Send, "m_flStepSize", 18.0 * gSize);
}

public int RRM_Callback_Size(bool enable, float value)
Expand All @@ -99,7 +109,6 @@ void SetSize()
if(!IsClientInGame(i))
continue;
SetEntPropFloat(i, Prop_Send, "m_flModelScale", gSize);
SetEntPropFloat(i, Prop_Send, "m_flStepSize", 18.0 * gSize);
}
}

Expand All @@ -110,6 +119,5 @@ void RemoveSize()
if(!IsClientInGame(i))
continue;
SetEntPropFloat(i, Prop_Send, "m_flModelScale", 1.0);
SetEntPropFloat(i, Prop_Send, "m_flStepSize", 18.0);
}
}

0 comments on commit 0d7a72c

Please sign in to comment.