Skip to content

Commit

Permalink
Merge pull request #196 from CBATeam/paramsgetpos
Browse files Browse the repository at this point in the history
'unbrittle' CBA_fnc_getPos, close #187
  • Loading branch information
Killswitch00 committed Nov 16, 2015
2 parents e5c30e8 + 57e8201 commit 09917f8
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 09917f8

Please sign in to comment.