Author: SerpentSerpent wrote:Pewnie wielu z Was spotkało się z tym problemem. Chodzi mianowicie o to że jeśli umieścimy człowieka w bunkrze (nie w wieżyczce!) za pomocą PlaceHumanInUnit to zawsze jest on zwrócony w kierunku 0 (północy wschód).
Poniżej zamieszczam funkcję która rozwiązuje ten problem:Przykład użycia:Code: Select all
Export Function PlaceUnitInBunker(un, b); var dir; begin dir := GetDir(b); if dir < 3 then dir := dir + 3 else dir := dir - 3; SetDir(un, dir); PlaceHumanInUnit(un, b); End;
Code: Select all
// jakiś tam kod un := CreateHuman; PlaceUnitInBunker(un, b); // gdzie b to ident bunkra
Topic: https://forum.original-war.net/viewtopi ... =42&t=4488