diff --git a/data/editor/entities.png b/data/editor/entities.png index dd4a9de56..6884f6076 100644 Binary files a/data/editor/entities.png and b/data/editor/entities.png differ diff --git a/data/maps/ctf2.map b/data/maps/ctf2.map index 57af2d611..817053299 100644 Binary files a/data/maps/ctf2.map and b/data/maps/ctf2.map differ diff --git a/data/maps/dm2.map b/data/maps/dm2.map index 471314810..8c68850dc 100644 Binary files a/data/maps/dm2.map and b/data/maps/dm2.map differ diff --git a/datasrc/teewars.ds b/datasrc/teewars.ds index 168695258..2ccd1c984 100644 --- a/datasrc/teewars.ds +++ b/datasrc/teewars.ds @@ -404,7 +404,7 @@ weapons { nummuzzlesprites 3 muzzleoffsetx 0.0 muzzleoffsety 0.0 - maxammo 10 + maxammo 5 recoil 10 firedelay 800 muzzleduration 0 diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp index d24d67c48..555c26a3f 100644 --- a/src/game/editor/ed_layer_tiles.cpp +++ b/src/game/editor/ed_layer_tiles.cpp @@ -145,8 +145,8 @@ void LAYER_TILES::brush_flip_x() for(int x = 0; x < width/2; x++) { TILE tmp = tiles[y*width+x]; - tiles[y*width+x] = tiles[y*width+x+width-1-x]; - tiles[y*width+x+width-1-x] = tmp; + tiles[y*width+x] = tiles[y*width+width-1-x]; + tiles[y*width+width-1-x] = tmp; } for(int y = 0; y < height; y++) diff --git a/src/game/g_mapitems.h b/src/game/g_mapitems.h index 48ae492d4..3caa53037 100644 --- a/src/game/g_mapitems.h +++ b/src/game/g_mapitems.h @@ -38,6 +38,7 @@ enum ENTITY_WEAPON_SHOTGUN, ENTITY_WEAPON_GRENADE, ENTITY_POWERUP_NINJA, + ENTITY_WEAPON_RIFLE, NUM_ENTITIES, TILE_AIR=0, diff --git a/src/game/server/gs_game.cpp b/src/game/server/gs_game.cpp index 74bb85692..6482fc3dd 100644 --- a/src/game/server/gs_game.cpp +++ b/src/game/server/gs_game.cpp @@ -65,6 +65,11 @@ bool gameobject::on_entity(int index, vec2 pos) type = POWERUP_WEAPON; subtype = WEAPON_GRENADE; } + else if(index == ENTITY_WEAPON_RIFLE) + { + type = POWERUP_WEAPON; + subtype = WEAPON_RIFLE; + } else if(index == ENTITY_POWERUP_NINJA) { type = POWERUP_NINJA; diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp index 8b9e406f2..7eae91e6d 100644 --- a/src/game/server/gs_server.cpp +++ b/src/game/server/gs_server.cpp @@ -854,8 +854,8 @@ void player::try_respawn() weapons[WEAPON_GUN].got = true; weapons[WEAPON_GUN].ammo = data->weapons[WEAPON_GUN].maxammo; - weapons[WEAPON_RIFLE].got = true; - weapons[WEAPON_RIFLE].ammo = -1; + /*weapons[WEAPON_RIFLE].got = true; + weapons[WEAPON_RIFLE].ammo = -1;*/ active_weapon = WEAPON_GUN; last_weapon = WEAPON_HAMMER; @@ -1648,10 +1648,10 @@ void powerup::tick() case POWERUP_WEAPON: if(subtype >= 0 && subtype < NUM_WEAPONS) { - if(pplayer->weapons[subtype].ammo < 10 || !pplayer->weapons[subtype].got) + if(pplayer->weapons[subtype].ammo < data->weapons[subtype].maxammo || !pplayer->weapons[subtype].got) { pplayer->weapons[subtype].got = true; - pplayer->weapons[subtype].ammo = min(10, pplayer->weapons[subtype].ammo + data->powerupinfo[type].amount); + pplayer->weapons[subtype].ammo = min(data->weapons[subtype].maxammo, pplayer->weapons[subtype].ammo + data->powerupinfo[type].amount); respawntime = data->powerupinfo[type].respawntime; // TODO: data compiler should take care of stuff like this