#######################################################################################################################* *----------------------------------------------------PhysicsComponent-----------------------------------------------------* *#########################################################################################################################*/
| 709 | *----------------------------------------------------PhysicsComponent-----------------------------------------------------* |
| 710 | *#########################################################################################################################*/ |
| 711 | void PhysicsComp_Init(struct PhysicsComp* comp, struct Entity* entity) { |
| 712 | Mem_Set(comp, 0, sizeof(struct PhysicsComp)); |
| 713 | comp->CanLiquidJump = true; |
| 714 | comp->Entity = entity; |
| 715 | comp->JumpVel = 0.42f; |
| 716 | comp->UserJumpVel = 0.42f; |
| 717 | comp->ServerJumpVel = 0.42f; |
| 718 | |
| 719 | comp->gravity = 0.08f; |
| 720 | Vec3_Set(comp->drag, 0.91f, 0.98f, 0.91f); |
| 721 | Vec3_Set(comp->groundFriction, 0.6f, 1.0f, 0.6f); |
| 722 | } |
| 723 | |
| 724 | static cc_bool PhysicsComp_TouchesLiquid(BlockID block) { return Blocks.Collide[block] == COLLIDE_LIQUID; } |
| 725 | void PhysicsComp_UpdateVelocityState(struct PhysicsComp* comp) { |
no test coverage detected