Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Set_Map errors?
Set_Map errors? [message #464388] Tue, 13 March 2012 18:21 Go to previous message
Agent is currently offline  Agent
Messages: 45
Registered: November 2010
Location: United States
Karma:
Recruit
I don't feel like retyping my question/problem, so:

[20:49:42] <SSIhekill> So, I've a simple lil bit here:
int x = Get_Current_Map_Index();
if (Set_Map(hfsparams, x+1) == 1) sprintf_s(tempstr,"Map %s set successfully to position %d.\n",Get_Map(x+1), x+1);
[20:50:11] <SSIhekill> It prints it out as if it were a success
[20:50:20] <SSIhekill> and any future calls to Get_Map print the map that was set
[20:50:34] <SSIhekill> however, when gameover is initialized, it does not proceed to the map which was set
[20:53:12] <SSIhekill> (Instead, it proceeds to the next map in the cycle in tt.cfg)
[20:53:49] <SSIhekill> And I'm pretty sure that it worked in beta 3 (this is in beta 4)
[20:58:12] <SSIhekill> So... Was anything changed that might cause this...?
[21:00:55] <SSIhekill> I would also like to note that Set_Map will not set mission maps (such as M01, M00_Tutorial, or Skrimish00) at all.

The position in which it's being set to is correct, but it seems that when the server is determining which map to load after a gameover, it does not load the map in Set_Map, instead it loads the map that's in tt.cfg. Just in case I've gone blind and made an error:

if ((_strcmpi(hscommand,"setnext") == 0) || (_strcmpi(hscommand,"setnextmap") == 0))
{
if (!hfsparams || hfsparams[0] == '\0')
{
Console_Output("No parameters for sub-command: %s given.\n",hscommand);
Console_Output("Syntax: SETNEXT <map>\n");
return;
}
int x = Get_Current_Map_Index();
char tempstr[1024];
if (Set_Map(hfsparams, x+1) == 1)
{
sprintf_s(tempstr,"Map %s set successfully to position %d.\n",Get_Map(x+1), x+1);
}
else
{
char tempstr2[1024];
sprintf_s(tempstr2,"C&C_%s",hfsparams);
if (Set_Map(tempstr2, x+1) == 1) sprintf_s(tempstr,"Map %s set successfully to position %d.\n",Get_Map(x+1), x+1);
else sprintf_s(tempstr,"Error: could not set the next map to %s or C&C_%s.\n",hfsparams,hfsparams);
}
SSGMGameLog::Log_Message(tempstr,"_NEXTMAPSET");
Console_Output(tempstr);
return;
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug involving custom objects and mslistc
Next Topic: Resource Manager
Goto Forum:
  


Current Time: Mon Apr 29 07:23:15 MST 2024

Total time taken to generate the page: 0.00771 seconds