Game will go into first person while at a gui and then back to thirdperson when leaving. Needed for maps which use gui consoles in them. Check comments in code for full details. Probably a better way to do this.
CheckCrossHairOrigin is used when entering and exiting guis to get the player's current setting and restore it when leaving the gui. Check the player.cpp for full details.
This was done so pm_thirdperson wil always reset to 1 when starting the game. If the game crashes or quits while in first person it was starting back up in it before.
New cvar to enable and disable launching projectiles from the weapon's world model barrel joint and also towards the crosshair's position. launchfrombarrel must be set to 0 in projectile def files to use. Done incase a weapon doesn't need it or has issues using it in the future. none currently do.
Changes cross hair trace line origin from the camera's origin to a joint on the player's model defined in player.cpp file
Done this way because pm_modelview cvar has some kind of over ride going on when the levels start. Consider this a work around fix.
Not sure how or why it happened, but the code was causing the bow to use wrong cross hairs, and auto weapon switch. I believe there was a mistake on my end when cleaning up the code in the player.cpp and playercursor.cpp files.
Additionally having a second weapon to use the soul cube hud notice is not needed as the planned weapon is not happening anytime soon.
Only the soul cube can display hud notifications when enough kills are done. this adds support for a 2nd weapon to do so. weapon is not in 2010 but will be 2018 build. Code should still be compatible with 2010 build.
This should fix hdr always resetting every time the game is restarted, thirdperson view sometimes not enabled by default, and the need for pm_modelview to be turned on for cross hair trace line origin fix.
Also cleaned up formatting around hdr cvars, and third person camera cvars.
Enabling the pm_modelview and setting the correct joint in the player.cpp file corrects issues with the trace line used for creating thirdperson crosshair getting cut off early due to objects being to close. Most mostly noticeable shooting around corners.
Stamina is now used for the player's shield spell. hold down the old zoom key to activate while the player has stamina. Calls are made to the player's script to UpdateSkin. UpdateSkin is new and not apart of vanilla d3 or Rivensin 2010 build
Stamina use also is no longer associated with player's movement and does not adjust movement speed.
The telishield key is used via the player script file to check if active and change the torso animations to blocking/spell casting.
Added the telishield key for the player def and script to use. This key disables the player taking damage and can be checked in the script for stuff like changing skins, etc.
cross hair fix: pm_modelview . This cvar changes the origin of the playerview to a joint for the crosshairs. This is set to a joint close to the player weapons to prevent the trace line used for cross hairs stopping too early when shooting around corners.
Additionally pm_modelview's axis is now the renderview axis and not the joint other wise the thirdperson crosshair is displayed in wrong directions.
pm_modelview is now on by default.
adds the telishield key for the player.def & script to use. When set to 1, the player will take no damage. Done this way so we can check it and also apply other effects such as player skin changing.
launch from barrel is no longer needed for projectiles to launch from the weapon's barrel, and then to the thirdperson cross hair position. This fixes the projectiles not launching to the center of the thirdperson cross and also fixes the offset when aiming too high or too low.
projectiles in weapon.def files need launchfrombarrel set to 0 for this work. the crosshair offsets also need to be adjust in the cursor.gui file as each one offset manually in Rivensin/Ruiner 2010 build.
This is an ugly hack that allows both exporting additional functions
(incl. methods via static function + void* userArg) to Game DLLs
and setting callback functions from the Game DLL that the Engine will
call, without breaking the Game API (again after this change).
This is mostly meant for replacing ugly hacks with SourceHook and
similar and mods (yes, this is still an ugly hack, but less ugly).
See the huge comment in Common.h for more information.
Right now the only thing implemented is a Callback for when images
are reloaded (via reloadImages or vid_restart) - Ruiner needs that.
Also increased GAME_API_VERSION to 9, because this breaks the A[PB]I
(hopefully after the next release it won't be broken in the foreseeable
future)
the game code asserts all the time, but seems to work when disabling
assertions..
so make sure assertions are really disabled with NDEBUG, even if _DEBUG
is set (like it is in debug builds).
this way I can at least get an unoptimized debug build that can actually
be tested.