mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fix: Spreadpatterns did never work since their externalization. Now they should work.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7624 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -182,7 +182,7 @@ INT32 GetSpreadPattern( OBJECTTYPE * pObj )
|
|||||||
//If there are attachments, check them. Stop on the first one with something defined.
|
//If there are attachments, check them. Stop on the first one with something defined.
|
||||||
//Dear God, I hate C++ iterators. What a fugly mess. //WarmSteel - I made it even messier ;3
|
//Dear God, I hate C++ iterators. What a fugly mess. //WarmSteel - I made it even messier ;3
|
||||||
for (attachmentList::iterator iter = pObj[0][0]->attachments.begin(); iter != pObj[0][0]->attachments.end(); ++iter){
|
for (attachmentList::iterator iter = pObj[0][0]->attachments.begin(); iter != pObj[0][0]->attachments.end(); ++iter){
|
||||||
if( n=Item[ iter->usItem ].spreadPattern && iter->exists()){
|
if( (n=Item[ iter->usItem ].spreadPattern) && iter->exists()){
|
||||||
//An attachment has it, and it trumps everything, so return it's value.
|
//An attachment has it, and it trumps everything, so return it's value.
|
||||||
return n;}
|
return n;}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ spreadpatternStartElementHandle(void *userData, const XML_Char *name, const XML_
|
|||||||
|| strcmp(name, "y") == 0
|
|| strcmp(name, "y") == 0
|
||||||
|| strcmp(name, "xspread") == 0
|
|| strcmp(name, "xspread") == 0
|
||||||
|| strcmp(name, "yspread") == 0
|
|| strcmp(name, "yspread") == 0
|
||||||
|| strcmp(name, "Name") == 0
|
|| strcmp(name, "NAME") == 0
|
||||||
|| strcmp(name, "method") == 0
|
|| strcmp(name, "method") == 0
|
||||||
))
|
))
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ spreadpatternEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
d = fabs( atof(pData->szCharData) );
|
d = fabs( atof(pData->szCharData) );
|
||||||
gpSpreadPattern[giSpreadPatternCount-1].yspread = d;
|
gpSpreadPattern[giSpreadPatternCount-1].yspread = d;
|
||||||
}
|
}
|
||||||
else if(strcmp(name, "Name") == 0)
|
else if(strcmp(name, "NAME") == 0)
|
||||||
{
|
{
|
||||||
pData->curElement = ELEMENT;
|
pData->curElement = ELEMENT;
|
||||||
//Trim whitespace.
|
//Trim whitespace.
|
||||||
|
|||||||
Reference in New Issue
Block a user