D i 5 7 i n c T's Spawn at last place
Allows players to (re)spawn at the last place they were and with the exact view angles they had on certain events like spawn, death, round start, round end, game commence, game restart.
Works flawlessly even in crouch zones and doesn't get you stuck or clip your view through objects.
Runs on any GoldSource(Half-Life 1) engine game.
Supports Counter-Strike: Condition Zero bots.
Add the following letters to the CVar value in order to define the plug-in's actions on the position(s) and view angles of the player(s):
- Save on round start
- Save on round end
- Save on game commence
- Save on game restart
- Save on player spawn
- Save on player death
- Reset on round start
- Reset on round end
- Reset on game commence
- Reset on game restart
- Reset on player spawn
- Reset on player death
If both reset and save of the same event are set, only the reset will trigger.
Set the CVar tot blank("") or 0 in order to disable. This will NOT delete previously saved player information such as origin and view angles.
This plug-in requires the following
- Ham Bots API. Latest version as of today(2015 December 22) of the script(cs_ham_bots_api.sma
) and include(cs_ham_bots_api.inc
) are attached along below.
- BitSum stocks include file (bitsums.inc
). Attached along below.
Get source and compile locally.
Use along with an unstuck plug-in, just in case you get teleported inside an entity that is moving and intersecting with your saved spot.
- For his "force duck" code
- For his game commence and restart hooks
. (Yes, I still don't know how to use register_event. Shame on me.)
- For his HamSandwich register bots API and preventing multiple end round triggers code from Zombie Plague Mod
- For his images I used to style up my post.
- For being true friends and always helping and teaching me new stuff.
- For requesting this
* To do
T = needs testing
X = done
- = cancelled
[ ] Make the teleported player able to pass through any entity for a certain amount of time or until he's not coliding with anything anymore to fully avoid getting stuck
[ ] add support for custom player sizes
[ ] add support for custom player view offsets
* v0.4.2 (2016 August 21)
[X] fix vertical angle not setting at the exact position of save(note it seems to be correcting until reaching the middle)
[X] fix first person camera clipping through solids when teleporting in very tight spaces
[T] add ability to save and reset on player spawn
[X] letters instead of numbers for the settings bitsum(Suggested by KliPPy)
[X] fix vertical angle of player model jumping when set
* v0.3.7 (2016 August 13)
[X] fix wrong vertical min and max for crouching once again(-25 -> -18, 25 -> 32)
[X] make last time round ended a local function static instead of a new global since we only use it there
[X] make a simple global variable for round ended instead of calculating time between the last round ends to further prevent multiple round ends triggering
[-] localize maxplayers variable inside ftInfoSavePlayer since it's only used there?
[X] fix position not saving on death
* v0.3.3 (2016 August 10)
[X] don't alter the player origin information on reset
[X] bitsum variable for player IDs that should be moved on spawn
[X] check for cvar != 0 on spawn before moving the player
[X] correct player model entity crouch vertical mins and maxs(18 -> 25 since 50 is the player vertical size when crouching and not 36)
[X] move the mins and maxs constants inside the function since it's the only place where they're being used
[-] reset players info on spawn if bitsum cvar is 0 so that the cvar check won't happen for the other players too
[-] reset players info on events if bitsum cvar is 0
[X] make iID constant in ftInfoResetPlayer since we don't use the loop hence won't change it anymore
[X] fix potential bug where individual player info could be saved if not alive
* v0.2.5 (2015 December 22)
- First release
[X] separate bits for death, commence, restart, end reset and save
[X] fix round end save being triggered on game commencing
[X] add support for CZ bots (optional)
[X] cache player alive status