Previously monster_name and vehicle_name were used, which were obviously used nowhere else.
Renamed them both to m_name, mostly so that the COLORED_NAME macro can work on them, and also so that there's less unnecessary entity fields.
// messages and sounds
if(IS_MONSTER(player))
{
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(flag.team, INFO_CTF_RETURN_MONSTER), player.monster_name);
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(flag.team, INFO_CTF_RETURN_MONSTER), player.m_name);
}
else if(flag.team)
{
mon.monster_skill = inv_monsterskill;
if(mon.monsterdef.spawnflags & MON_FLAG_SUPERMONSTER)
- Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, mon.monster_name);
+ Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_INVASION_SUPERMONSTER, mon.m_name);
}
MUTATOR_HOOKFUNCTION(inv, SV_StartFrame)
/** attributes */
ATTRIB(Monster, spawnflags, int, 0);
/** human readable name */
- ATTRIB(Monster, monster_name, string, _("Monster"));
+ ATTRIB(Monster, m_name, string, _("Monster"));
/** short name */
ATTRIB(Monster, netname, string, "");
/** color */
ATTRIB(Golem, m_model, Model, MDL_MON_GOLEM);
#endif
ATTRIB(Golem, netname, string, "golem");
- ATTRIB(Golem, monster_name, string, _("Golem"));
+ ATTRIB(Golem, m_name, string, _("Golem"));
#ifdef MENUQC
METHOD(Golem, describe, string(Golem this))
{
ATTRIB(Mage, m_model, Model, MDL_MON_MAGE);
#endif
ATTRIB(Mage, netname, string, "mage");
- ATTRIB(Mage, monster_name, string, _("Mage"));
+ ATTRIB(Mage, m_name, string, _("Mage"));
#ifdef MENUQC
METHOD(Mage, describe, string(Mage this))
{
ATTRIB(Spider, m_model, Model, MDL_MON_SPIDER);
#endif
ATTRIB(Spider, netname, string, "spider");
- ATTRIB(Spider, monster_name, string, _("Spider"));
+ ATTRIB(Spider, m_name, string, _("Spider"));
#ifdef MENUQC
METHOD(Spider, describe, string(Spider this))
{
ATTRIB(Wyvern, m_model, Model, MDL_MON_WYVERN);
#endif
ATTRIB(Wyvern, netname, string, "wyvern");
- ATTRIB(Wyvern, monster_name, string, _("Wyvern"));
+ ATTRIB(Wyvern, m_name, string, _("Wyvern"));
#ifdef MENUQC
METHOD(Wyvern, describe, string(Wyvern this))
{
ATTRIB(Zombie, m_model, Model, MDL_MON_ZOMBIE);
#endif
ATTRIB(Zombie, netname, string, "zombie");
- ATTRIB(Zombie, monster_name, string, _("Zombie"));
+ ATTRIB(Zombie, m_name, string, _("Zombie"));
#ifdef MENUQC
METHOD(Zombie, describe, string(Zombie this))
{
else
setmodel(this, mon.m_model);
- if(!this.monster_name || this.monster_name == "")
- this.monster_name = mon.monster_name;
+ if(!this.m_name || this.m_name == "")
+ this.m_name = mon.m_name;
if(this.statuseffects && this.statuseffects.owner == this)
{
if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
if (s == WP_Weapon.netname) return REGISTRY_GET(Weapons, this.wp_extra).m_name;
if (s == WP_Item.netname) return REGISTRY_GET(Items, this.wp_extra).m_waypoint;
- if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).monster_name;
+ if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_name;
if (MUTATOR_CALLHOOK(WP_Format, this, s))
{
return M_ARGV(3, string);
/** short name */
ATTRIB(Vehicle, netname, string, "");
/** human readable name */
- ATTRIB(Vehicle, vehicle_name, string, _("Vehicle"));
+ ATTRIB(Vehicle, m_name, string, _("Vehicle"));
/** color */
ATTRIB(Vehicle, m_color, vector, '1 1 1');
/** full name of model */
}
#endif
METHOD(Vehicle, display, void(entity this, void(string name, string icon) returns)) {
- returns(this.vehicle_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
+ returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
}
/** (BOTH) setup vehicle data */
/* tags */ ATTRIB(Bumblebee, tag_view, string, "tag_viewport");
#endif
/* netname */ ATTRIB(Bumblebee, netname, string, "bumblebee");
-/* fullname */ ATTRIB(Bumblebee, vehicle_name, string, _("Bumblebee"));
+/* fullname */ ATTRIB(Bumblebee, m_name, string, _("Bumblebee"));
/* icon */ ATTRIB(Bumblebee, m_icon, string, "vehicle_bumble");
#ifdef MENUQC
METHOD(Bumblebee, describe, string(Bumblebee this))
/* tags */ ATTRIB(Racer, tag_view, string, "tag_viewport");
#endif
/* netname */ ATTRIB(Racer, netname, string, "racer");
-/* fullname */ ATTRIB(Racer, vehicle_name, string, _("Racer"));
+/* fullname */ ATTRIB(Racer, m_name, string, _("Racer"));
/* icon */ ATTRIB(Racer, m_icon, string, "vehicle_racer");
#ifdef MENUQC
METHOD(Racer, describe, string(Racer this))
/* tags */ ATTRIB(Raptor, tag_view, string, "tag_camera");
#endif
/* netname */ ATTRIB(Raptor, netname, string, "raptor");
-/* fullname */ ATTRIB(Raptor, vehicle_name, string, _("Raptor"));
+/* fullname */ ATTRIB(Raptor, m_name, string, _("Raptor"));
/* icon */ ATTRIB(Raptor, m_icon, string, "vehicle_raptor");
#ifdef MENUQC
METHOD(Raptor, describe, string(Raptor this))
/* tags */ ATTRIB(Spiderbot, tag_view, string, "");
#endif
/* netname */ ATTRIB(Spiderbot, netname, string, "spiderbot");
-/* fullname */ ATTRIB(Spiderbot, vehicle_name, string, _("Spiderbot"));
+/* fullname */ ATTRIB(Spiderbot, m_name, string, _("Spiderbot"));
/* icon */ ATTRIB(Spiderbot, m_icon, string, "vehicle_spider");
#ifdef MENUQC
METHOD(Spiderbot, describe, string(Spiderbot this))
if (mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
if (!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
- string mon_oldname = mon.monster_name;
+ string mon_oldname = mon.m_name;
- mon.monster_name = argument;
+ mon.m_name = argument;
if (mon.sprite) WaypointSprite_UpdateSprites(mon.sprite, WP_Monster, WP_Null, WP_Null); // TODO: the new name is never actually sent to CSQC!
- print_to(caller, sprintf("Your pet '%s' is now known as '%s'", mon_oldname, mon.monster_name));
+ print_to(caller, sprintf("Your pet '%s' is now known as '%s'", mon_oldname, mon.m_name));
return;
}
case "spawn":
totalspawned += 1;
WarpZone_TraceBox(CENTER_OR_VIEWOFS(caller), caller.mins, caller.maxs, CENTER_OR_VIEWOFS(caller) + v_forward * 150, true, caller);
mon = spawnmonster(spawn(), arg_lower, MON_Null, caller, caller, trace_endpos, false, false, moveflag);
- print_to(caller, strcat("Spawned ", mon.monster_name));
+ print_to(caller, strcat("Spawned ", mon.m_name));
return;
}
case "kill":
if (!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
Damage(mon, NULL, NULL, GetResource(mon, RES_HEALTH) + mon.max_health + 200, DEATH_KILL.m_id, DMG_NOWEP, mon.origin, '0 0 0');
- print_to(caller, strcat("Your pet '", mon.monster_name, "' has been brutally mutilated"));
+ print_to(caller, strcat("Your pet '", mon.m_name, "' has been brutally mutilated"));
return;
}
case "skin":