Originally Posted by
Saffith
I see what the problem is, but it's actually a bug in older versions. Game->SetComboSolid() treated maps as being numbered from 0 instead of 1. Every other function got it right.
This will probably be handled with an extra rule, meaning it will depend on the version the quest was saved in.
I should have looked at the 2.50.1 source...
Code:
case COMBOSDM:
{
int pos = (ri->d[0])/10000;
long scr = (ri->d[1]/10000)*MAPSCRS+(ri->d[2]/10000);
if(pos < 0 || pos >= 176 || scr < 0) break;
combobuf[TheMaps[scr].data[pos]].walk=(value/10000)&15;
}
break;
whereas we have
Code:
case COMBOSDM:
{
int pos = (ri->d[0])/10000;
int sc = (ri->d[2]/10000);
int m = (ri->d[1]/10000)-1;
if(pos<0 || pos>=176 ||
sc<0 || sc>=MAPSCRS ||
m<0 || m>=map_count)
break;
long scr = m*MAPSCRS+sc;
combobuf[TheMaps[scr].data[pos]].walk=(value/10000)&15;
}
break;
For whatever reason, the handler is completely different to the rest of the set. Must have been revised somewhen along the history of this, missing the setter for COMBOSDM.
I wasn't aware that you had rewritten the ZScript handlers between versions, and I didn't check that far back; but it seems that you further refined them from the 2.50.1 incarnations.
Whatever way you want to do it sounds good to me as I should think it would be fairly easy to reconcile, although there aren't any quests being made yet in 2.50.3, whether it is worth changing how it worked in the past to justify adding the version change baggage elsewhere is probably debatable.
I seem to recall there being a ZSCRIPT_VERSION definition, so perhaps just updating that and writing the rule around it would be the best way. Just keep me informed please on what you decide to do, and how you do it so that I stay synchronised.
I suppose if you have a specific implementation in mind, please post a diff to the boards, so that I can merge them and make everyone happy; as if that'll ever happen. If you put it on Git, just mark the change in the git comments and drop a link to me. I haven't checked in lately to see if the other recent bugfixes are live up there, but I need to integrate those, too.