Player Physics System icon

Player Physics System

НазваниеPlayer Physics System
Дата конвертации08.01.2013
Размер6.01 Kb.
1. /Events.doc
2. /HLTV.doc
3. /HLVoice.doc
4. /How to make a mod.doc
5. /Input.doc
6. /Modeling for Half-Life.doc
7. /NetGraph.doc
8. /NetworkEntity.doc
9. /PlayerPhysics.doc
10. /Triangle.doc
11. /View.doc
12. /server protocol.txt
Event System
How to enable hltv in your mod
Hl sdk 3 Voice api
How to Make a Mod
Keyboard Handlers
Modeling and Animating for Half-Life
Changes to the Net Graph for hl 1016
Game and client dll networking hooks
Player Physics System
Triangle api
View Setup System

HL SDK 2.3

Player Physics System

In this version of the Half-Life engine SDK, the MOD authors now have control over all player movement physics behavior. This allows interesting physics tweaks for MODs as well as allowing the creation of new physics types ( e.g., allowing various spectator modes ) which can be shared between the game server and client code.

The source files for the player physics code may be found in the pm_shared/ directory. Note that the files in the shared folder are shared between both the client and game .dll. You should also note that some of the headers are referenced in the engine, so care should be taken not to alter important data structures in those files. To alter player physics, one simply changes the appropriate code in the pm_shared/ directory ( most likely in pm_shared.c ) and recompiles the client .dll and the game .dll. Both of those projects reference the same source file so prediction errors are unlikely to occur – so long as you remember to compile both projects if you make physics changes.

All player movements ( either predicted on the client or actual on the server ) occur by the engine invoking PM_PlayerMove ( found in pm_shared.c ) called via PM_Move().

This function evaluates the move as follows ( generally ):

Parameters such as maximum speed, punch angle adjustment, and dead player view angle tweaks are checked in PM_CheckParameters().

Any timers associated with player physics ( e.g., time before playing another step sound, etc. ) are decremented in PM_ReduceTimers().

The player's position is checked to see if the player is stuck in the world or another entity. If not, the player's position is categorized in PM_CatagorizePosition(), which checks whether the player is standing on an entity/the ground or is in the air and also, if the player is under water, this checks how far under water ( feet, torso, eyes ).

If the player is holding the crouch/duck key, PM_Duck deals with that action.

Finally, depending on the player's movetype, one of various movetype specific code paths is followed. The MOVETYPE_WALK code path is the most relevant, as this handles the player in the normal state ( walking, swimming ). This is where gravity, friction, water or ground movement, jumping, velocity capping, and falling are taken into account.

The main data structure for player movement is the pmove structure. This structure contains the relevant data elements as input / output for the move. I.e., the engine fills in most of the data before calling this function and the results of movement on the relevant variables is recorded by setting them in the pmove structure before returning control to the engine.

In addition, various API callbacks are provided to help the physics system perform the move. Such things as retrieving physics key/value pairs for the player, testing the player position, printing to the console, getting the current clock, determining the contents value for a point, tracing rays, generating random numbers, getting model data from a model pointer, playing sounds, tracing to determine a texture name, and playing back events are supported. The pmove structure ( playermove_t ) is defined in pm_defs.h.


Player Physics System iconДокументи
1. /тесты Political System/TEST Western Democracies лексика.doc
2. /тесты...

Player Physics System iconPlayer M

Player Physics System iconPlayer 1

Player Physics System iconНастенные газовые котлы серии talia system комфорт на заказ
Одноконтурный отопительный котел. Котёл talia system идеально подходит для систем, выполненных по индивидуальному заказу. Обеспечивает...
Player Physics System iconДокументи
Player Physics System iconКакой программой открывать файлы ?
Открывается в Media Player Classic из набора кодеков k-lite Codec Pack (Standart)
Player Physics System iconДокументи
1. /GDZ of Physics 11 class Myakishev GY BB Buhovtsev/Физика. Решебник. 11 кл._Парфентьева...
Player Physics System iconДокументи
1. /GDZ of Physics Grade 11 S. Gromov/Физика 11кл_Громов_Опт Тепл явл Строен вещ_2002_Ответы...
Player Physics System iconSystem

Player Physics System iconThema I text Das politische System

Player Physics System iconBanking System of Great Britain 1979

Разместите кнопку на своём сайте:

База данных защищена авторским правом © 2000-2013
При копировании материала обязательно указание активной ссылки открытой для индексации.
обратиться к администрации