Skip to content

Commit

Permalink
'unbrittle' CBA_fnc_getPos, close #187
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Nov 15, 2015
1 parent dc84bc7 commit e3a32b4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions addons/common/fnc_getPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description:
A function used to get the position of an entity.
Parameters:
Marker, Object, Location, Group or Position
Marker, Object, Location, Group or Task
Example:
(begin example)
Expand All @@ -20,21 +20,23 @@ Author:
---------------------------------------------------------------------------- */

switch (typename _this) do {
params ["_thing"];

switch (typename _thing) do {
case "OBJECT" : {
getpos _this
getpos _thing
};
case "GROUP" : {
getpos (leader _this)
getpos (leader _thing)
};
case "STRING" : {
getmarkerpos _this
getmarkerpos _thing
};
case "LOCATION" : {
position _this
position _thing
};
case "TASK" : {
taskdestination _this
taskdestination _thing
};
default {_this};
};

0 comments on commit e3a32b4

Please sign in to comment.