Cyberdogs guns #268

Fix no-max ammo issues
Add obvious placeholder gun sound
This commit is contained in:
Cong
2022-04-30 11:42:47 +10:00
parent a1dc56bed5
commit 621fbfa4e6
17 changed files with 193 additions and 147 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -17,7 +17,7 @@
"Pic": "grenade_pickup"
},
"Sound": "grenade_pickup",
"Amount": 5
"Amount": 10
},
{
"Name": "Cells",
@@ -46,6 +46,15 @@
"Pic": "rockets"
},
"Sound": "grenade_pickup",
"Amount": 10
},
{
"Name": "Gas tank",
"Pic": {
"Type": "Normal",
"Pic": "gas_tank"
},
"Sound": "gas_tank_pickup",
"Amount": 100
}
]

View File

@@ -31,7 +31,7 @@
"Power": 2,
"Hit": {
"Flesh": {
"Sound": "hits/chainsaw"
"Sound": "chainsaw"
}
}
},
@@ -40,7 +40,7 @@
"Power": 4,
"Hit": {
"Flesh": {
"Sound": "hits/chainsaw"
"Sound": "chainsaw"
}
}
},
@@ -49,7 +49,7 @@
"Power": 6,
"Hit": {
"Flesh": {
"Sound": "hits/chainsaw"
"Sound": "chainsaw"
}
}
},
@@ -58,7 +58,7 @@
"Power": 8,
"Hit": {
"Flesh": {
"Sound": "hits/chainsaw"
"Sound": "chainsaw"
}
}
},
@@ -67,7 +67,7 @@
"Power": 10,
"Hit": {
"Flesh": {
"Sound": "hits/chainsaw"
"Sound": "chainsaw"
}
}
},
@@ -170,23 +170,25 @@
},
"OutOfRangeGuns": [
"blast_weak",
"demo_weak",
"explosion_spread"
"explosion"
],
"HitGuns": [
"blast_weak",
"demo_weak",
"explosion_spread"
"explosion"
],
"Size": [1, 1]
},
{
"Name": "megagrenade",
"Name": "megarocket",
"Pic": {
"Type": "Animated",
"Sprites": "grenade",
"TicksPerFrame": 2,
"Mask": "808080"
"Type": "Directional",
"Sprites": "rocket"
},
"Trail": {
"Particle": "smoke_trail_small",
"Width": 0,
"TicksPerEmit": 4
},
"ShadowSize": [6, 4],
"Speed": 384,
@@ -202,13 +204,12 @@
},
"OutOfRangeGuns": [
"blast_strong",
"demo_strong",
"explosion_spread"
"explosion"
],
"HitGuns": [
"blast_strong",
"demo_strong",
"explosion_spread"
"explosion"
],
"Size": [1, 1]
},
@@ -281,7 +282,7 @@
{
"Name": "blast_strong",
"Range": 1,
"Power": 40,
"Power": 200,
"Size": [32, 32],
"Persists": true,
"Spark": "",
@@ -293,27 +294,28 @@
"Name": "demo_weak",
"Range": 1,
"Power": 40,
"Size": [1, 1],
"Size": [2, 2],
"Spark": "",
"Hit": {
"Object": {}
}
},
{
"Name": "explosion_spread",
"SpeedLow": -256,
"SpeedHigh": 256,
"Name": "demo_strong",
"Range": 1,
"Hit": {},
"OutOfRangeGuns": [
"explosion"
]
"Power": 200,
"Size": [2, 2],
"Spark": "",
"Hit": {
"Object": {}
}
},
{
"Name": "explosion_cast",
"SpeedLow": 0,
"SpeedHigh": 4096,
"SpeedLow": 4096,
"SpeedHigh": 8192,
"Range": 1,
"Hit": {},
"OutOfRangeGuns": [
"explosion_ball"
]

View File

@@ -0,0 +1,20 @@
{
"Version": 13,
"Characters": [{
"Class": "Ogre",
"Skin": "00ff00ff",
"Arms": "404040ff",
"Body": "404040ff",
"Legs": "404040ff",
"Hair": "000000ff",
"Feet": "404040ff",
"speed": 256,
"Gun": "DumbGun",
"maxHealth": 40,
"flags": 1024,
"probabilityToMove": 50,
"probabilityToTrack": 25,
"probabilityToShoot": 0,
"actionDelay": 15
}]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -59,13 +59,12 @@
{
"Pic": "",
"Icon": "fist",
"Name": "Fists",
"Description": "A melee weapon of last resort",
"Name": "Barehanded",
"Bullet": "fist",
"Cost": 0,
"Lock": 0,
"Sound": "",
"SoundLockLength": 50,
"SoundLockLength": 20,
"SwitchSound": "knuckles",
"CanShoot": false,
"CanDrop": false
@@ -90,7 +89,7 @@
"Lock": 30,
"Sound": "bottle_pop",
"SwitchSound": "swarmer_switch",
"Elevation": 24,
"Elevation": 12,
"Ammo": "Grenades"
},
{
@@ -152,7 +151,7 @@
"Grips": 2,
"Name": "MegaGun",
"Icon": "megagun",
"Bullet": "megagrenade",
"Bullet": "megarocket",
"Lock": 30,
"Sound": "swell",
"SwitchSound": "heatseeker_switch",
@@ -178,9 +177,30 @@
}
],
"PseudoGuns" : [
{
"Name": "blast_weak",
"Bullet": "blast_weak",
"Sound": "explosion_small"
},
{
"Name": "demo_weak",
"Bullet": "demo_weak",
"Sound": ""
},
{
"Name": "blast_strong",
"Bullet": "blast_strong",
"Sound": "explosion"
},
{
"Name": "demo_strong",
"Bullet": "demo_strong",
"Sound": ""
},
{
"Name": "explosion",
"Bullet": "explosion_cast",
"Sound": "",
"Recoil": 6.28,
"SpreadCount": 5,
"Shake": {
@@ -189,7 +209,8 @@
},
{
"Name": "explosion_ball",
"Bullet": "explosion_ball"
"Bullet": "explosion_ball",
"Sound": ""
}
]
}

View File

@@ -3,17 +3,20 @@
"Title": "Test",
"Description": "Testing mission",
"Type": "Static",
"Width": 48,
"Height": 48,
"Width": 21,
"Height": 20,
"ExitStyle": "hazard",
"KeyStyle": "office",
"Objectives": [],
"Enemies": [],
"Enemies": [0],
"SpecialChars": [],
"MapObjectDensities": [],
"EnemyDensity": 0,
"Weapons": [],
"WeaponPersist": false,
"MapObjectDensities": [{
"MapObject": "crate",
"Density": 75
}],
"EnemyDensity": 13,
"Weapons":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,0,0,0,0"],
"StaticItems": [{
"MapObject": "Chainsaw spawner",
"Positions": [[7, 3]]
@@ -158,7 +105,7 @@
"Positions": [[7, 11]]
},
{
"MapObject": "Fists spawner",
"MapObject": "Barehanded spawner",
"Positions": [[7, 13]]
},
{
@@ -179,19 +126,51 @@
},
{
"MapObject": "Lazer spawner",
"Positions": [[9, 11]]
"Positions": [[11, 7]]
},
{
"MapObject": "TurboLazer spawner",
"Positions": [[9, 13]]
"Positions": [[11, 9]]
},
{
"MapObject": "Blaster spawner",
"Positions": [[9, 15]]
"MapObject": "DumbGun spawner",
"Positions": [[11, 3]]
},
{
"MapObject": "Gun spawner",
"Positions": [[11, 5]]
},
{
"MapObject": "MegaGun spawner",
"Positions": [[9, 17]]
"Positions": [[9, 11]]
},
{
"MapObject": "Blaster spawner",
"Positions": [[9, 13]]
},
{
"MapObject": "Bullets ammo spawner",
"Positions": [[10, 3]]
},
{
"MapObject": "Grenades ammo spawner",
"Positions": [[10, 5]]
},
{
"MapObject": "Gas tank ammo spawner",
"Positions": [[10, 7]]
},
{
"MapObject": "Cells ammo spawner",
"Positions": [[10, 9]]
},
{
"MapObject": "Rockets ammo spawner",
"Positions": [[10, 11]]
},
{
"MapObject": "Mini cells ammo spawner",
"Positions": [[10, 13]]
}],
"StaticCharacters": [],
"StaticObjectives": [],

BIN
sounds/laserpew.ogg Normal file

Binary file not shown.

4
sounds/laserpew.txt Normal file
View File

@@ -0,0 +1,4 @@
Pew Laser fire Sound
by sketcherskt
https://opengameart.org/content/pew-laser-fire-sound
http://creativecommons.org/publicdomain/zero/1.0/

View File

@@ -713,7 +713,10 @@ void ActorAddAmmo(TActor *actor, const int ammoId, const int amount)
int *ammo = CArrayGet(&actor->ammo, ammoId);
*ammo += amount;
const int ammoMax = AmmoGetById(&gAmmo, ammoId)->Max;
*ammo = CLAMP(*ammo, 0, ammoMax);
if (ammoMax > 0)
{
*ammo = CLAMP(*ammo, 0, ammoMax);
}
}
bool ActorUsesAmmo(const TActor *actor, const int ammoId)

View File

@@ -354,8 +354,9 @@ static void DrawWeaponStatus(
if (amount > 0)
{
const Pic *fillPic = PicManagerGetPic(pm, "hud/gauge_small_inner");
const int ammoMax = ammo->Max ? ammo->Max : amount;
const struct vec2i fillPicSize = svec2i(
MAX(1, (AMMO_WIDTH - 1) * amount / ammo->Max),
MAX(1, (AMMO_WIDTH - 1) * amount / ammoMax),
fillPic->size.y);
Draw9Slice(
g, fillPic, Rect2iNew(svec2i(pos.x, pos.y), fillPicSize), 1, 1,

View File

@@ -255,7 +255,14 @@ void LoadBulletGuns(CArray *guns, json_t *node, const char *name)
for (json_t *gun = node->child->child; gun; gun = gun->next)
{
const WeaponClass *wc = StrWeaponClass(gun->text);
CArrayPushBack(guns, &wc);
if (wc == NULL)
{
CASSERT(false, "cannot find weapon class!");
}
else
{
CArrayPushBack(guns, &wc);
}
}
}
void LoadColor(color_t *c, json_t *node, const char *name)

View File

@@ -141,7 +141,7 @@ static void LoadWeaponClass(WeaponClass *wc, json_t *node, const int version)
CSTRDUP(wc->u.Normal.Sprites, "chars/guns/blaster");
wc->u.Normal.Grips = 1;
wc->Icon = PicManagerGetPic(&gPicManager, "peashooter");
wc->u.Normal.Sound = StrSound("bang");
wc->u.Normal.Sound = StrSound("laserpew");
wc->SwitchSound = StrSound("switch");
wc->u.Normal.Spread.Count = 1;
wc->u.Normal.MuzzleHeight = 10 * Z_FACTOR;