From 795003f38148a6b5bc12fbbf62e9c23dad3c960a Mon Sep 17 00:00:00 2001 From: Cong Date: Mon, 11 Mar 2024 09:34:02 +1100 Subject: [PATCH] Fix Most Classified Enemy compatibility with character shades --- src/cdogs/character.c | 2 +- src/cdogs/character_class.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cdogs/character.c b/src/cdogs/character.c index 42fb9b644..def95f097 100644 --- a/src/cdogs/character.c +++ b/src/cdogs/character.c @@ -2,7 +2,7 @@ C-Dogs SDL A port of the legendary (and fun) action/arcade cdogs. - Copyright (c) 2013-2014, 2016, 2019-2021, 2023 Cong Xu + Copyright (c) 2013-2014, 2016, 2019-2021, 2023-2024 Cong Xu All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/cdogs/character_class.c b/src/cdogs/character_class.c index 4ded0d9a9..a9e98450f 100644 --- a/src/cdogs/character_class.c +++ b/src/cdogs/character_class.c @@ -274,6 +274,12 @@ void CharacterOldHairToHeadParts(char *headParts[HEAD_PART_COUNT]) headParts[HEAD_PART_HAIR] = NULL; CSTRDUP(headParts[HEAD_PART_GLASSES], "ski_goggles"); } + else if (strcmp(hair, "shades") == 0) + { + CFREE(headParts[HEAD_PART_HAIR]); + headParts[HEAD_PART_HAIR] = NULL; + CSTRDUP(headParts[HEAD_PART_GLASSES], "shades"); + } } const NamedSprites *CharacterClassGetDeathSprites(const CharacterClass *c, const PicManager *pm)