-
-
Notifications
You must be signed in to change notification settings - Fork 461
Beacon changes (funcommands) #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added game color config & specific settings for L4D/L4D2 Created the following keys: "Team1Color" "75,255,75,255" "Team2Color" "255,75,75,255" "Team3Color" "75,75,255,255" "Team4Color" "255,128,0,255" "TeamUnknownColor" "255,255,255,255" Added a specific setting for L4D/L4D2 game: "Team2Color" "75,75,255,255" "Team3Color" "255,75,75,255"
Added method "GetColor" to convert the string into a valid int[4] RGBA format. Created 5 new vars: int g_Team1Color[4] int g_Team2Color[4] int g_Team3Color[4] int g_Team4Color[4] int g_TeamUnknownColor[4] Loading 5 new configs from funcommands.games.txt (gamedata file): Team1Color -> g_Team1Color Team2Color -> g_Team2Color Team3Color -> g_Team3Color Team4Color -> g_Team4Color TeamUnknownColor -> g_TeamUnknownColor
-Added "teamColor" var to set the beacon color based on the client's team, instead of calling TE_SetupBeamRingPoint on each team check. -Moved TE_SetupBeamRingPoint calls more near each other. -Converted "if else" to "switch case" statement. -Removed "team" var. -Added different beacon color to Team 4 (hidden team on L4D2), may also apply to other games.
Added External Beacon key: - ExternalBeaconColor
Added External Beacon - ExternalBeaconColor key -> g_ExternalBeaconColor var
External beacon color reading from g_ExternalBeaconColor var
Colors based on default funcommands.sp color vars
Fixed beacon key names
Fixed beacon key names
Renamed teamColor var to teamBeaconColor
asherkin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this back - the gamedata stuff is a solid improvement here and I think a lot of L4D(2) servers are going to like it.
I've left a couple of small inlines I'd like to see addressed before merging, but otherwise this looks mostly like what was ready-to-go before.
Renamed GetColor Method to ParseMethod Added a new line at the end of funcommands.sp file
|
Some var colors aren't being used now, like "greencolor" and "redcolor" so the build will fail. |
I'd go with just removing the unused ones. |
Removed unused vars: - redColor - greenColor
|
Looks like the changes from the previous commit got reverted. |
Changed method name "GetColor" to "ParseColor"
Added new line ending to the file
|
Yeah thanks! Repaired. |
Removed TrimString function from the code. Used before when the separator was a space, but changed it to a comma to be safer.
|
Thanks! |
Some changes to the beacon fun function.
Changes to funcommands.sp / beacon.sp / funcommands.games.txt: