The Whole Half-Life
TWHL
Forums
Wiki
Vault
Competitions
Discord
More...
Journals
News
Polls
Members
Go
Go
Login
Email or Username
Password
Remember Me
Login
Forgot Your Password?
Register
The Whole Half-Life
Level design resources for GoldSource, Source, and beyond
Featured map:
dm_poisongarden
by
Rimrook
Forums
Wiki
Vault
Competitions
Discord
Community
Journals
News
Polls
Members
Login/Register
Remember Me
Login
Forgot Your Password?
New user?
Create an account
First person camera position
Created
6 years ago
2018-03-10 05:25:16 UTC
by
Yu2673
Forums
HL Engine Discussion
View Thread
Created
6 years ago
2018-03-10 05:25:16 UTC
by
Yu2673
Yu2673
Posted
6 years ago
2018-03-10 05:25:16 UTC
Post #338988
I'm curious if there a way to change players eye-camera position to make it slightly higher. Is it hard coded or there is simply a console command?
Yu2673
Solokiller
Posted
6 years ago
2018-03-10 10:44:58 UTC
Post #338989
That's defined here:
Server only code:
https://github.com/ValveSoftware/halflife/blob/master/dlls/player.cpp#L2911
Shared physics code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L1952
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L2021
Standing to ducking transition code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L2045
When the player is dead it's changed to be on the ground:
Server only code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/player.cpp#L1409
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/player.cpp#L1456
Shared physics code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L2892
The constant is defined here for server code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dlls/util.h#L420
Physics code:
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L86
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L79
https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/pm_shared/pm_shared.c#L80
Note that the server only constant is used by other code as well, so don't change the constant itself, just define a new one.
As usual it's defined twice, you can rework it if you want.
Solokiller
Yu2673
Posted
6 years ago
2018-03-11 03:45:19 UTC
Post #338994
Thanks!
Yu2673
You must be logged in to post a response.