From 80eb18a4254a9a0579fa92fae2fc3558fb5aa9ac Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 18 Jun 2011 14:31:46 -0400 Subject: [PATCH] Moved GetEntityClassname to end of entity.inc to fix plugin compile errors (bug 4798). --- plugins/include/entity.inc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/include/entity.inc b/plugins/include/entity.inc index 46810e9b..c9332138 100644 --- a/plugins/include/entity.inc +++ b/plugins/include/entity.inc @@ -162,21 +162,6 @@ native SetEdictFlags(edict, flags); */ native bool:GetEdictClassname(edict, String:clsname[], maxlength); -/** - * Retrieves the classname of an entity. - * This is like GetEdictClassname(), except it works for ALL - * entities, not just edicts. - * - * @param edict Index of the entity. - * @param clsname Buffer to store the classname. - * @param maxlength Maximum length of the buffer. - * @return True on success, false if there is no classname set. - */ -stock bool:GetEntityClassname(entity, String:clsname[], maxlength) -{ - return !!GetEntPropString(entity, Prop_Data, "m_iClassname", clsname, maxlength); -} - /** * Retrieves an entity's networkable serverclass name. * This is not the same as the classname and is used for networkable state changes. @@ -705,3 +690,18 @@ stock SetEntDataArray(entity, offset, const array[], arraySize, dataSize=4, bool SetEntData(entity, offset + i*dataSize, array[i], dataSize, changeState); } } + +/** + * Retrieves the classname of an entity. + * This is like GetEdictClassname(), except it works for ALL + * entities, not just edicts. + * + * @param edict Index of the entity. + * @param clsname Buffer to store the classname. + * @param maxlength Maximum length of the buffer. + * @return True on success, false if there is no classname set. + */ +stock bool:GetEntityClassname(entity, String:clsname[], maxlength) +{ + return !!GetEntPropString(entity, Prop_Data, "m_iClassname", clsname, maxlength); +}