| 942 | //--------------------------------------------------------------------------- |
| 943 | |
| 944 | int DoFall(DSWActor* actor) |
| 945 | { |
| 946 | // adjust jump speed by gravity |
| 947 | actor->user.jump_speed += actor->user.jump_grav * ACTORMOVETICS; |
| 948 | |
| 949 | // adjust player height by jump speed |
| 950 | actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS * JUMP_FACTOR; |
| 951 | |
| 952 | // Stick like glue when you hit the ground |
| 953 | if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist) |
| 954 | { |
| 955 | actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist; |
| 956 | actor->user.Flags &= ~(SPR_FALLING); |
| 957 | } |
| 958 | |
| 959 | return 0; |
| 960 | } |
| 961 | |
| 962 | //--------------------------------------------------------------------------- |
| 963 | // |
no outgoing calls
no test coverage detected