Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rebalance Spawnpoints #26

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open

Rebalance Spawnpoints #26

wants to merge 58 commits into from

Conversation

legokidlogan
Copy link
Member

@legokidlogan legokidlogan commented Aug 1, 2024

Does some assorted cleanup to match current CFC coding standards (and fix minor bugs), adds some audiovisual polish for player interaction, and makes the following balance changes:

  • Max spawnpoint count per player is now 1. (sbox_maxsent_spawnpoint)
  • When a player spawns, they have a 10s cooldown before they can create/link spawnpoints. (cfc_spawnpoints_cooldown_on_ply_spawn)
  • When a spawnpoint is created, it has a 5s cooldown before anyone can link to it. (cfc_spawnpoints_cooldown_on_point_spawn)
  • Both cooldowns only apply if the player had another spawnpoint removed in the past 30s, so the system doesn't impede initial base setup.
    (cfc_spawnpoints_removal_window)

The goal is to make it considerably harder for someone to maintain a permanent spawn point by repeatedly creating and linking to one (or pre-spawned backups) between deaths. Now defenders must actually defeat any immediate threats before they can reclaim their spawn if it gets destroyed while they are still alive.

@legokidlogan legokidlogan added the enhancement New feature or request label Aug 1, 2024
@legokidlogan legokidlogan self-assigned this Aug 1, 2024
wrefgtzweve
wrefgtzweve previously approved these changes Feb 6, 2025
Copy link
Member

@brandonsturgeon brandonsturgeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I at least want to discuss these points - we can VC or something if you'd like 👍

Let's shoot to reach an agreement on these so we can merge some time tomorrow 💯

Comment on lines +20 to +39
function CFC_SpawnPoints.IsFriendly( spawnPoint, ply )
if not CPPI then
if spawnPoint:GetCreatingPlayer() == ply then return true end

return false, "You can only link to your own Spawn Points."
end

local owner = spawnPoint:CPPIGetOwner()
if ply == owner then return true end

local friends = owner.CPPIGetFriends and owner:CPPIGetFriends()

if not friends or friends == CPPI.CPPI_DEFER or friends == CPPI.CPPI_NOTIMPLEMENTED then
return false, "You can only link to your own Spawn Points."
end

if table.HasValue( friends, ply ) then return true end

return false, "You are not buddied with the Spawn Point's owner."
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would probably be good to have a hook in here somewhere too (squad addons or something)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the readme, it's noted that this function is meant to be overridden as needed, and cfc_pvp already does this. I personally think spawnpoint friendliness needs too specific of a check to make sense with hooks, but I can change it if you have a good idea on how to handle it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants