SickBoySB / cecommpatch

Clockwork Empires Community Patch
22 stars 12 forks source link

Dropped bodies teleport slightly after placement #211

Open SickBoySB opened 7 years ago

SickBoySB commented 7 years ago

I think the problem is with how dropping from an adjacent position works. Commenting out

        send(tag.target,
            "GameObjectPlace",
            state.AI.targetPosition.x,
            state.AI.targetPosition.y)

in drop_person.fsm "fixes" the problem, but that actually causes all kinds of problems (the body's position is reported as its original death position).

Perhaps adjacent position isn't the right solution in this case... maybe just drop at location.. hmm.. would need a new FSM, "walk_to_target_position".

The problem is ultimately a non-critical one, but visually it looks strange... especially if a job occurs afterwards (butchering, etc.)

SickBoySB commented 7 years ago

Making a custom set of FSMs based on walk_to_adjacent_target_position kind of works, but because of the nature of GameObjectPlace the corpse will still tele-rotate. Other FSMs use a 'face the position' snippet... that might work, but since rotation is always the same direction it may not be enough without a lot of custom code to make sure the living actor is in the right spot.