Skip to content

Commit

Permalink
Sheep sleep #712
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed Aug 28, 2024
1 parent d8f77f9 commit 45e16ed
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
25 changes: 23 additions & 2 deletions data/.wolf3d/N3Ddata.cdogscpn/character_classes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
{
"Version": 2,
"Characters": [
{
"Name": "Noah",
"HeadPics": {
"Type": "Directional",
"Sprites": "chars/heads/jones"
},
"Sounds": "man",
"BloodColor": "0066ff"
},
{
"Name": "Naamah",
"HeadPics": {
"Type": "Directional",
"Sprites": "chars/heads/lady"
},
"Sounds": "woman",
"BloodColor": "0066ff"
},
{
"Name": "Sheep",
"HeadPics": {
Expand All @@ -9,7 +27,8 @@
},
"Body": "dog",
"Sounds": "sheep",
"Corpse": "dead_guard"
"Corpse": "sheep_sleep",
"BloodColor": "00000000"
},
{
"Name": "Goat",
Expand All @@ -19,7 +38,9 @@
},
"Body": "dog",
"Sounds": "sheep",
"Footsteps": "dog"
"Footsteps": "dog",
"Corpse": "sheep_sleep",
"BloodColor": "00000000"
},
{
"Name": "SS",
Expand Down
8 changes: 4 additions & 4 deletions data/.wolf3d/N3Ddata.cdogscpn/characters.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Version": 14,
"Characters": [{
"Class": "Jones",
"Class": "Noah",
"PlayerTemplateName": "Noah",
"FacehairType": "beard",
"Skin": "ffb26aff",
Expand Down Expand Up @@ -289,7 +289,7 @@
"actionDelay": 40
},
{
"Class": "Lady",
"Class": "Naamah",
"PlayerTemplateName": "Naamah",
"HairType": "long",
"Skin": "ffb26aff",
Expand All @@ -312,7 +312,7 @@
"actionDelay": 15
},
{
"Class": "Jones",
"Class": "Noah",
"PlayerTemplateName": "Utnapishtim",
"HairType": "ponytail",
"FacehairType": "dutch",
Expand All @@ -336,7 +336,7 @@
"actionDelay": 15
},
{
"Class": "Jones",
"Class": "Noah",
"PlayerTemplateName": "Ziusudra",
"HairType": "long",
"FacehairType": "beard",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions data/.wolf3d/N3Ddata.cdogscpn/map_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,15 @@
"Offset": [-8, -11],
"Health": 0,
"Flags": ["OnWall"]
},
{
"Name": "sheep_sleep",
"Pic": {
"Type": "Normal",
"Pic": "sheep_sleep"
},
"Health": 0,
"DrawBelow": true
}
]
}
7 changes: 6 additions & 1 deletion src/cdogs/actors.c
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,11 @@ static void ActorAddBloodSplatters(
const GoreAmount ga = ConfigGetEnum(&gConfig, "Graphics.Gore");
if (ga == GORE_NONE)
return;
const color_t bloodColor = ActorGetCharacter(a)->Class->BloodColor;
if (bloodColor.a == 0)
{
return;
}

// Emit blood based on power and gore setting
int bloodPower = power * 2;
Expand Down Expand Up @@ -2281,7 +2286,7 @@ static void ActorAddBloodSplatters(
ap.Angle = NAN;
ap.Z = 10;
ap.Vel = vel;
ap.Mask = ActorGetCharacter(a)->Class->BloodColor;
ap.Mask = bloodColor;
EmitterStart(em, &ap);
switch (ga)
{
Expand Down

0 comments on commit 45e16ed

Please sign in to comment.