Cube  Diff

Differences From Artifact [f7cff8c331]:

To Artifact [d0a68a37a3]:


1
2
3
4
5
6

7
8
9
10
11
12
13
// clientgame.cpp: core game related stuff

#include "cube.h"

#import "DynamicEntity.h"
#import "Entity.h"

#import "OFString+Cube.h"

int nextmode = 0; // nextmode becomes gamemode after next map load
VAR(gamemode, 1, 0, 0);

static void
mode(int n)






>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
// clientgame.cpp: core game related stuff

#include "cube.h"

#import "DynamicEntity.h"
#import "Entity.h"
#import "Monster.h"
#import "OFString+Cube.h"

int nextmode = 0; // nextmode becomes gamemode after next map load
VAR(gamemode, 1, 0, 0);

static void
mode(int n)
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
				shoot(player1, &worldpos);
			// do this first, so we have most accurate information
			// when our player moves
			gets2c();
		}
		otherplayers();
		if (!demoplayback) {
			monsterthink();
			if (player1.state == CS_DEAD) {
				if (lastmillis - player1.lastAction < 2000) {
					player1.move = player1.strafe = 0;
					moveplayer(player1, 10, false);
				} else if (!m_arena && !m_sp &&
				    lastmillis - player1.lastAction > 10000)
					respawn();







|







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
				shoot(player1, &worldpos);
			// do this first, so we have most accurate information
			// when our player moves
			gets2c();
		}
		otherplayers();
		if (!demoplayback) {
			[Monster thinkAll];
			if (player1.state == CS_DEAD) {
				if (lastmillis - player1.lastAction < 2000) {
					player1.move = player1.strafe = 0;
					moveplayer(player1, 10, false);
				} else if (!m_arena && !m_sp &&
				    lastmillis - player1.lastAction > 10000)
					respawn();
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
startmap(OFString *name) // called just after a map load
{
	if (netmapstart() && m_sp) {
		gamemode = 0;
		conoutf(@"coop sp not supported yet");
	}
	sleepwait = 0;
	monsterclear();
	projreset();
	spawncycle = -1;
	spawnplayer(player1);
	player1.frags = 0;
	for (id player in players)
		if (player != [OFNull null])
			[player setFrags:0];







|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
startmap(OFString *name) // called just after a map load
{
	if (netmapstart() && m_sp) {
		gamemode = 0;
		conoutf(@"coop sp not supported yet");
	}
	sleepwait = 0;
	[Monster resetAll];
	projreset();
	spawncycle = -1;
	spawnplayer(player1);
	player1.frags = 0;
	for (id player in players)
		if (player != [OFNull null])
			[player setFrags:0];