Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 132055 | Differences between
and this patch

Collapse All | Expand All

(-)trunk/vavoom/source/p_acs.cpp (-3 / +3 lines)
Lines 2486-2492 Link Here
2486
			}
2486
			}
2487
			else
2487
			else
2488
			{
2488
			{
2489
				BroadcastCentrePrintf(*PrintStr);
2489
				BroadcastCentrePrint(*PrintStr);
2490
			}
2490
			}
2491
			ACSVM_BREAK;
2491
			ACSVM_BREAK;
2492
2492
Lines 2649-2655 Link Here
2649
		ACSVM_CASE(PCD_EndPrintBold)
2649
		ACSVM_CASE(PCD_EndPrintBold)
2650
			//FIXME yellow message
2650
			//FIXME yellow message
2651
			PrintStr = PrintStr.EvalEscapeSequences();
2651
			PrintStr = PrintStr.EvalEscapeSequences();
2652
			BroadcastCentrePrintf(*PrintStr);
2652
			BroadcastCentrePrint(*PrintStr);
2653
			ACSVM_BREAK;
2653
			ACSVM_BREAK;
2654
2654
2655
		//	Extended P-Code commands.
2655
		//	Extended P-Code commands.
Lines 2974-2980 Link Here
2974
			}
2974
			}
2975
			else
2975
			else
2976
			{
2976
			{
2977
				BroadcastCentrePrintf(*PrintStr);
2977
				BroadcastCentrePrint(*PrintStr);
2978
			}
2978
			}
2979
			sp = optstart - 6;
2979
			sp = optstart - 6;
2980
			ACSVM_BREAK;
2980
			ACSVM_BREAK;
(-)trunk/vavoom/source/p_thinker.cpp (-5 / +31 lines)
Lines 294-299 Link Here
294
294
295
//==========================================================================
295
//==========================================================================
296
//
296
//
297
//	VThinker::BroadcastPrint
298
//
299
//==========================================================================
300
301
void VThinker::BroadcastPrint(const char *s)
302
{
303
	guard(VThinker::BroadcastPrint);
304
	for (int i = 0; i < svs.max_clients; i++)
305
		if (Level->Game->Players[i])
306
			Level->Game->Players[i]->eventClientPrint(s);
307
	unguard;
308
}
309
310
//==========================================================================
311
//
297
//	VThinker::BroadcastPrintf
312
//	VThinker::BroadcastPrintf
298
//
313
//
299
//==========================================================================
314
//==========================================================================
Lines 308-316 Link Here
308
	vsprintf(buf, s, v);
323
	vsprintf(buf, s, v);
309
	va_end(v);
324
	va_end(v);
310
325
326
	BroadcastPrint(buf);
327
	unguard;
328
}
329
330
//==========================================================================
331
//
332
//	VThinker::BroadcastCentrePrint
333
//
334
//==========================================================================
335
336
void VThinker::BroadcastCentrePrint(const char *s)
337
{
338
	guard(VThinker::BroadcastCentrePrint);
311
	for (int i = 0; i < svs.max_clients; i++)
339
	for (int i = 0; i < svs.max_clients; i++)
312
		if (Level->Game->Players[i])
340
		if (Level->Game->Players[i])
313
			Level->Game->Players[i]->eventClientPrint(buf);
341
			Level->Game->Players[i]->eventClientCentrePrint(s);
314
	unguard;
342
	unguard;
315
}
343
}
316
344
Lines 330-338 Link Here
330
	vsprintf(buf, s, v);
358
	vsprintf(buf, s, v);
331
	va_end(v);
359
	va_end(v);
332
360
333
	for (int i = 0; i < svs.max_clients; i++)
361
	BroadcastCentrePrint(buf);
334
		if (Level->Game->Players[i])
335
			Level->Game->Players[i]->eventClientCentrePrint(buf);
336
	unguard;
362
	unguard;
337
}
363
}
338
364
Lines 444-450 Link Here
444
{
470
{
445
	VStr Msg = PF_FormatString();
471
	VStr Msg = PF_FormatString();
446
	P_GET_SELF;
472
	P_GET_SELF;
447
	Self->BroadcastPrintf(*Msg);
473
	Self->BroadcastPrint(*Msg);
448
}
474
}
449
475
450
IMPLEMENT_FUNCTION(VThinker, AllocDlight)
476
IMPLEMENT_FUNCTION(VThinker, AllocDlight)
(-)trunk/vavoom/source/p_thinker.h (+2 lines)
Lines 76-82 Link Here
76
	void AddSoundSequenceChoice(vint32, VName);
76
	void AddSoundSequenceChoice(vint32, VName);
77
	void StopSoundSequence(vint32);
77
	void StopSoundSequence(vint32);
78
78
79
	void BroadcastPrint(const char*);
79
	void BroadcastPrintf(const char*, ...);
80
	void BroadcastPrintf(const char*, ...);
81
	void BroadcastCentrePrint(const char*);
80
	void BroadcastCentrePrintf(const char*, ...);
82
	void BroadcastCentrePrintf(const char*, ...);
81
83
82
	DECLARE_FUNCTION(Spawn)
84
	DECLARE_FUNCTION(Spawn)
(-)trunk/vavoom/source/screen.cpp (+6 lines)
Lines 203-208 Link Here
203
	void	*data;
203
	void	*data;
204
	char	filename[128];
204
	char	filename[128];
205
205
206
	if (strlen(screenshot_type) > 8)
207
	{
208
		GCon->Log("Screenshot extension too long");
209
		return;
210
	}
211
206
	//	Find a file name to save it to
212
	//	Find a file name to save it to
207
	VStr BaseDir = (fl_savedir ? fl_savedir : fl_basedir) + "/" + fl_gamedir;
213
	VStr BaseDir = (fl_savedir ? fl_savedir : fl_basedir) + "/" + fl_gamedir;
208
	for (i = 0; i <= 9999; i++)
214
	for (i = 0; i <= 9999; i++)
(-)trunk/vavoom/source/str.h (+2 lines)
Lines 345-350 Link Here
345
		{
345
		{
346
			vint32 Len;
346
			vint32 Len;
347
			Strm << STRM_INDEX(Len);
347
			Strm << STRM_INDEX(Len);
348
			if (Len < 0)
349
				Len = 0;
348
			S.Resize(Len);
350
			S.Resize(Len);
349
			if (Len)
351
			if (Len)
350
				Strm.Serialise(S.Str, Len + 1);
352
				Strm.Serialise(S.Str, Len + 1);
(-)trunk/vavoom/source/sv_main.cpp (-4 / +4 lines)
Lines 1431-1444 Link Here
1431
COMMAND(Map)
1431
COMMAND(Map)
1432
{
1432
{
1433
	guard(COMMAND Map);
1433
	guard(COMMAND Map);
1434
	char	mapname[12];
1434
	VStr	mapname;
1435
1435
1436
	if (Args.Num() != 2)
1436
	if (Args.Num() != 2)
1437
	{
1437
	{
1438
		GCon->Log("map <mapname> : change level");
1438
		GCon->Log("map <mapname> : change level");
1439
		return;
1439
		return;
1440
	}
1440
	}
1441
	VStr::Cpy(mapname, *Args[1]);
1441
	mapname = Args[1];
1442
1442
1443
	SV_ShutdownServer(false);
1443
	SV_ShutdownServer(false);
1444
#ifdef CLIENT
1444
#ifdef CLIENT
Lines 1461-1467 Link Here
1461
	GGameInfo->netgame = svs.max_clients > 1;
1461
	GGameInfo->netgame = svs.max_clients > 1;
1462
	GGameInfo->eventInitNewGame(gameskill);
1462
	GGameInfo->eventInitNewGame(gameskill);
1463
1463
1464
	SV_SpawnServer(mapname, true);
1464
	SV_SpawnServer(*mapname, true);
1465
#ifdef CLIENT
1465
#ifdef CLIENT
1466
	if (cls.state != ca_dedicated)
1466
	if (cls.state != ca_dedicated)
1467
		GCmdBuf << "Connect local\n";
1467
		GCmdBuf << "Connect local\n";
Lines 1624-1630 Link Here
1624
		Text += " ";
1624
		Text += " ";
1625
		Text += Args[i];
1625
		Text += Args[i];
1626
	}
1626
	}
1627
	GLevelInfo->BroadcastPrintf(*Text);
1627
	GLevelInfo->BroadcastPrint(*Text);
1628
	GLevelInfo->StartSound(TVec(0, 0, 0), 0,
1628
	GLevelInfo->StartSound(TVec(0, 0, 0), 0,
1629
		GSoundManager->GetSoundID("misc/chat"), 0, 1.0, 0);
1629
		GSoundManager->GetSoundID("misc/chat"), 0, 1.0, 0);
1630
	unguard;
1630
	unguard;

Return to bug 132055