|
From: <cn...@us...> - 2021-07-21 21:17:36
|
Revision: 1191
http://sourceforge.net/p/seq/svn/1191
Author: cn187
Date: 2021-07-21 21:17:34 +0000 (Wed, 21 Jul 2021)
Log Message:
-----------
Change fillSpawnStruct to loop through posData
Change fillSpawnStruct to loop through posData (based on struct size)
rather than hardcoding the fill of each element. This will allow the size
of posData to change without needing to adjust fillSpawnStruct.
Modified Paths:
--------------
showeq/trunk/src/spawnshell.cpp
Modified: showeq/trunk/src/spawnshell.cpp
===================================================================
--- showeq/trunk/src/spawnshell.cpp 2021-07-21 21:17:07 UTC (rev 1190)
+++ showeq/trunk/src/spawnshell.cpp 2021-07-21 21:17:34 UTC (rev 1191)
@@ -798,11 +798,9 @@
spawn->equipment[8].equip0 = netStream.readUInt32NC();
}
- spawn->posData[0] = netStream.readUInt32NC();
- spawn->posData[1] = netStream.readUInt32NC();
- spawn->posData[2] = netStream.readUInt32NC();
- spawn->posData[3] = netStream.readUInt32NC();
- spawn->posData[4] = netStream.readUInt32NC();
+ for (int i = 0; i < (sizeof(spawn->posData)/sizeof(spawn->posData[0])); ++i) {
+ spawn->posData[i] = netStream.readUInt32NC();
+ }
if(spawn->hasTitle)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|