Sgqvur
FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
- Reaction score
- 62
What's the idea behind adding the extra (unneeded type?) unitref? Isn't the unit type enough?
//--------------------------------------------------------------------------------------------------
// Unit Reference
// - A unitref may refer to a unit explicitly or through a unit variable
//--------------------------------------------------------------------------------------------------
native unitref UnitRefFromUnit (unit u);
native unitref UnitRefFromVariable (string v);
native unit UnitRefToUnit (unitref r);
Is there any point of natives taking unitrefs instead of directly units?
It seems it's mainly used in the TriggerRegisterEvents natives.
//--------------------------------------------------------------------------------------------------
// Unit Reference
// - A unitref may refer to a unit explicitly or through a unit variable
//--------------------------------------------------------------------------------------------------
native unitref UnitRefFromUnit (unit u);
native unitref UnitRefFromVariable (string v);
native unit UnitRefToUnit (unitref r);
Is there any point of natives taking unitrefs instead of directly units?
It seems it's mainly used in the TriggerRegisterEvents natives.