fp: Make players unable to collide with each other
This commit is contained in:
parent
815d7aa808
commit
13af438612
@ -942,6 +942,17 @@ static FP_GameCanMoveToPositionResult FP_Game_CanEntityMoveToPosition(FP_Game *g
|
|||||||
if ((collider->flags & FP_GameEntityFlag_NonTraversable) == 0)
|
if ((collider->flags & FP_GameEntityFlag_NonTraversable) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
bool skip_colliding_with_player = false;
|
||||||
|
for (FP_GameEntityHandle player : game->play.players) {
|
||||||
|
if (player == collider->handle) {
|
||||||
|
skip_colliding_with_player = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (skip_colliding_with_player)
|
||||||
|
continue;
|
||||||
|
|
||||||
bool entity_collides_with_collider = true;
|
bool entity_collides_with_collider = true;
|
||||||
switch (entity->type) {
|
switch (entity->type) {
|
||||||
case FP_EntityType_Catfish: /*FALLTHRU*/
|
case FP_EntityType_Catfish: /*FALLTHRU*/
|
||||||
|
@ -356,11 +356,6 @@ struct FP_GamePlay
|
|||||||
FP_GameEntityHandle merchant_gym;
|
FP_GameEntityHandle merchant_gym;
|
||||||
FP_GameEntityHandle merchant_phone_company;
|
FP_GameEntityHandle merchant_phone_company;
|
||||||
|
|
||||||
Dqn_V2 merchant_terry_menu_pos;
|
|
||||||
Dqn_V2 merchant_graveyard_menu_pos;
|
|
||||||
Dqn_V2 merchant_gym_menu_pos;
|
|
||||||
Dqn_V2 merchant_phone_company_menu_pos;
|
|
||||||
|
|
||||||
FP_GameEntityHandle clicked_entity;
|
FP_GameEntityHandle clicked_entity;
|
||||||
FP_GameEntityHandle hot_entity;
|
FP_GameEntityHandle hot_entity;
|
||||||
FP_GameEntityHandle active_entity;
|
FP_GameEntityHandle active_entity;
|
||||||
|
Loading…
Reference in New Issue
Block a user