- fixed SetEntDataArray being bogus

- fixed some comments

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401016
This commit is contained in:
David Anderson 2007-06-24 18:56:58 +00:00
parent aa5f3c1cf2
commit 5271043e92
3 changed files with 5 additions and 7 deletions

View File

@ -691,8 +691,7 @@ stock GetEntDataArray(entity, offset, array[], arraySize, dataSize=4)
{
for (new i=0; i<arraySize; i++)
{
array[i] = GetEntData(entity, offset, dataSize)
offset += dataSize;
array[i] = GetEntData(entity, offset + i*dataSize, dataSize)
}
}
@ -709,11 +708,10 @@ stock GetEntDataArray(entity, offset, array[], arraySize, dataSize=4)
* @noreturn
* @error Invalid entity or offset out of reasonable bounds.
*/
stock SetEntDataArray(entity, offset, value, const array[], arraySize, dataSize=4, bool:changeState=false)
stock SetEntDataArray(entity, offset, const array[], arraySize, dataSize=4, bool:changeState=false)
{
for (new i=0; i<arraySize; i++)
{
SetEntData(entity, real_offset, array[i], dataSize, changeState);
offset += dataSize;
SetEntData(entity, offset + i*dataSize, array[i], dataSize, changeState);
}
}

View File

@ -76,7 +76,7 @@ enum
/**
* Reasons a menu ended.
*/
enum MenuEndReason
enum
{
MenuEnd_Selected = 0, /**< Menu item was selected */
MenuEnd_VotingDone = -1, /**< Voting finished */

View File

@ -22,7 +22,7 @@
* @global Unless otherwise noted, all string functions which take in a
* writable buffer and maximum length should have the null terminator INCLUDED
* in the length. This means that this is valid:
* StrCopy(string, sizeof(string), ...)
* strcopy(string, sizeof(string), ...)
*/
/**