Skip to content

Commit 64299b0

Browse files
committed
Consistency
1 parent 1cbba4a commit 64299b0

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

lua/cfc_random_spawn/module/cl_spawns_editor.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ local clearCode = tostring( math.random( 1000, 9999 ) )
2121
local spawnTable = {}
2222
local zoneCornerA = nil
2323
local zoneCornerB = nil
24-
local activeSpawnCenter = nil
24+
local activeCenter = nil
2525
local centerCutoffDefault = 3000
2626

2727

@@ -77,8 +77,8 @@ hook.Add( "PostDrawTranslucentRenderables", "CFC_SpawnEditor_DrawSpawnPoints", f
7777
if sky or sky3d then return end
7878

7979
if spawnTable.spawnpoints then
80-
local activeCenterPos = activeSpawnCenter and activeSpawnCenter.centerPos
81-
local activeCenterCutoff = activeSpawnCenter and activeSpawnCenter.centerCutoff or centerCutoffDefault
80+
local activeCenterPos = activeCenter and activeCenter.centerPos
81+
local activeCenterCutoff = activeCenter and activeCenter.centerCutoff or centerCutoffDefault
8282

8383
for _, spawn in ipairs( spawnTable.spawnpoints ) do
8484
local spawnPos = spawn.spawnPos
@@ -112,8 +112,8 @@ hook.Add( "PostDrawTranslucentRenderables", "CFC_SpawnEditor_DrawSpawnPoints", f
112112
render.DrawWireframeBox( emptyVector, emptyAngle, zoneCornerA, zoneCornerB, zoneUnconfirmedColor, false )
113113
end
114114

115-
if activeSpawnCenter then
116-
drawPvPCenter( activeSpawnCenter, centerActiveColor, centerActiveRangeColor, 50 )
115+
if activeCenter then
116+
drawPvPCenter( activeCenter, centerActiveColor, centerActiveRangeColor, 50 )
117117
end
118118
end )
119119

@@ -409,8 +409,8 @@ end
409409
concommand.Add( "cfc_spawneditor_clearall", clearAll, _, "Clears all spawn points and pvp centers. Dangerous." )
410410

411411

412-
net.Receive( "CFC_SpawnEditor_ActiveSpawnCenter", function()
413-
activeSpawnCenter = {
412+
net.Receive( "CFC_SpawnEditor_ActiveCenter", function()
413+
activeCenter = {
414414
centerPos = net.ReadVector(),
415415
centerCutoff = net.ReadFloat(),
416416
}

lua/cfc_random_spawn/module/sv_player_spawning.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ local spawnTraceRequest = {
4444
local CurTime = CurTime
4545
local Vector = Vector
4646

47-
util.AddNetworkString( "CFC_SpawnEditor_ActiveSpawnCenter" )
47+
util.AddNetworkString( "CFC_SpawnEditor_ActiveCenter" )
4848

4949

5050
local function defaultPvpCenter()
@@ -464,7 +464,7 @@ local function updatePopularCenter( measurablePlayers )
464464

465465
if not next( editors ) then return end
466466

467-
net.Start( "CFC_SpawnEditor_ActiveSpawnCenter" )
467+
net.Start( "CFC_SpawnEditor_ActiveCenter" )
468468
net.WriteVector( mostPopularCenter.centerPos )
469469
net.WriteFloat( mostPopularCenter.centerCutoff or DEFAULT_CENTER_CUTOFF )
470470
net.Send( editors )

0 commit comments

Comments
 (0)