Fill in some more info to help botlib's AI (weapon types, gamemode team setting)

This commit is contained in:
Marco Cawthorne 2022-03-10 19:01:08 -08:00
parent 127f9eba7f
commit fe0b9681d0
Signed by: eukara
GPG Key ID: C196CD8BA993248A
26 changed files with 42 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class CSMultiplayerRules:CSGameRules
virtual void(void) CountPlayers;
virtual void(void) SwitchTeams;
virtual void(void) TimeOut;
virtual float(void) IsTeamPlay;
virtual void(base_player) PlayerClearWeaponry;
virtual void(base_player, int) PlayerMakePlayable;

View File

@ -969,6 +969,12 @@ CSMultiplayerRules::ConsoleCommand(base_player pp, string cmd)
return (1);
}
float
CSMultiplayerRules::IsTeamPlay(void)
{
return TRUE;
}
void
CSMultiplayerRules::CSMultiplayerRules(void)
{

View File

@ -321,6 +321,7 @@ weapon_t w_ak47 =
.deathmsg = w_ak47_deathmsg,
.aimanim = w_ak47_aimanim,
.hudpic = w_ak47_hudpic,
.type = csweapon_ranged_type,
.isempty = w_ak47_isempty
};

View File

@ -311,6 +311,7 @@ weapon_t w_aug =
.deathmsg = w_aug_deathmsg,
.aimanim = w_aug_aimanim,
.hudpic = w_aug_hudpic,
.type = csweapon_ranged_type,
.isempty = w_aug_isempty
};

View File

@ -366,6 +366,7 @@ weapon_t w_awp =
.deathmsg = w_awp_deathmsg,
.aimanim = w_awp_aimanim,
.hudpic = w_awp_hudpic,
.type = csweapon_ranged_type,
.isempty = w_awp_isempty
};

View File

@ -320,6 +320,7 @@ weapon_t w_deagle =
.deathmsg = w_deagle_deathmsg,
.aimanim = w_deagle_aimanim,
.hudpic = w_deagle_hudpic,
.type = csweapon_ranged_type,
.isempty = w_deagle_isempty
};

View File

@ -390,6 +390,7 @@ weapon_t w_elites =
.deathmsg = w_elites_deathmsg,
.aimanim = w_elites_aimanim,
.hudpic = w_elites_hudpic,
.type = csweapon_ranged_type,
.isempty = w_elites_isempty
};

View File

@ -289,6 +289,7 @@ weapon_t w_fiveseven =
.deathmsg = w_fiveseven_deathmsg,
.aimanim = w_fiveseven_aimanim,
.hudpic = w_fiveseven_hudpic,
.type = csweapon_ranged_type,
.isempty = w_fiveseven_isempty
};

View File

@ -304,6 +304,7 @@ weapon_t w_g3sg1 =
.deathmsg = w_g3sg1_deathmsg,
.aimanim = w_g3sg1_aimanim,
.hudpic = w_g3sg1_hudpic,
.type = csweapon_ranged_type,
.isempty = w_g3sg1_isempty
};

View File

@ -356,6 +356,7 @@ weapon_t w_glock18 =
.deathmsg = w_glock18_deathmsg,
.aimanim = w_glock18_aimanim,
.hudpic = w_glock18_hudpic,
.type = csweapon_ranged_type,
.isempty = w_glock18_isempty
};

View File

@ -241,6 +241,7 @@ weapon_t w_knife =
.deathmsg = w_knife_deathmsg,
.aimanim = w_knife_aimanim,
.hudpic = w_knife_hudpic,
.type = csweapon_melee_type,
.isempty = w_knife_isempty
};

View File

@ -368,6 +368,7 @@ weapon_t w_m3 =
.deathmsg = w_m3_deathmsg,
.aimanim = w_m3_aimanim,
.hudpic = w_m3_hudpic,
.type = csweapon_ranged_type,
.isempty = w_m3_isempty
};

View File

@ -361,6 +361,7 @@ weapon_t w_m4a1 =
.deathmsg = w_m4a1_deathmsg,
.aimanim = w_m4a1_aimanim,
.hudpic = w_m4a1_hudpic,
.type = csweapon_ranged_type,
.isempty = w_m4a1_isempty
};

View File

@ -284,6 +284,7 @@ weapon_t w_mac10 =
.deathmsg = w_mac10_deathmsg,
.aimanim = w_mac10_aimanim,
.hudpic = w_mac10_hudpic,
.type = csweapon_ranged_type,
.isempty = w_mac10_isempty
};

View File

@ -282,6 +282,7 @@ weapon_t w_mp5 =
.deathmsg = w_mp5_deathmsg,
.aimanim = w_mp5_aimanim,
.hudpic = w_mp5_hudpic,
.type = csweapon_ranged_type,
.isempty = w_mp5_isempty
};

View File

@ -290,6 +290,7 @@ weapon_t w_p228 =
.deathmsg = w_p228_deathmsg,
.aimanim = w_p228_aimanim,
.hudpic = w_p228_hudpic,
.type = csweapon_ranged_type,
.isempty = w_p228_isempty
};

View File

@ -282,6 +282,7 @@ weapon_t w_p90 =
.deathmsg = w_p90_deathmsg,
.aimanim = w_p90_aimanim,
.hudpic = w_p90_hudpic,
.type = csweapon_ranged_type,
.isempty = w_p90_isempty
};

View File

@ -278,6 +278,7 @@ weapon_t w_para =
.deathmsg = w_para_deathmsg,
.aimanim = w_para_aimanim,
.hudpic = w_para_hudpic,
.type = csweapon_ranged_type,
.isempty = w_para_isempty
};

View File

@ -329,6 +329,7 @@ weapon_t w_scout =
.deathmsg = w_scout_deathmsg,
.aimanim = w_scout_aimanim,
.hudpic = w_scout_hudpic,
.type = csweapon_ranged_type,
.isempty = w_scout_isempty
};

View File

@ -305,6 +305,7 @@ weapon_t w_sg550 =
.deathmsg = w_sg550_deathmsg,
.aimanim = w_sg550_aimanim,
.hudpic = w_sg550_hudpic,
.type = csweapon_ranged_type,
.isempty = w_sg550_isempty
};

View File

@ -308,6 +308,7 @@ weapon_t w_sg552 =
.deathmsg = w_sg552_deathmsg,
.aimanim = w_sg552_aimanim,
.hudpic = w_sg552_hudpic,
.type = csweapon_ranged_type,
.isempty = w_sg552_isempty
};

View File

@ -282,6 +282,7 @@ weapon_t w_tmp =
.deathmsg = w_tmp_deathmsg,
.aimanim = w_tmp_aimanim,
.hudpic = w_tmp_hudpic,
.type = csweapon_ranged_type,
.isempty = w_tmp_isempty
};

View File

@ -282,6 +282,7 @@ weapon_t w_ump45 =
.deathmsg = w_ump45_deathmsg,
.aimanim = w_ump45_aimanim,
.hudpic = w_ump45_hudpic,
.type = csweapon_ranged_type,
.isempty = w_ump45_isempty
};

View File

@ -360,6 +360,7 @@ weapon_t w_usp45 =
.deathmsg = w_usp45_deathmsg,
.aimanim = w_usp45_aimanim,
.hudpic = w_usp45_hudpic,
.type = csweapon_ranged_type,
.isempty = w_usp45_isempty
};

View File

@ -370,6 +370,7 @@ weapon_t w_xm1014 =
.deathmsg = w_xm1014_deathmsg,
.aimanim = w_xm1014_aimanim,
.hudpic = w_xm1014_hudpic,
.type = csweapon_ranged_type,
.isempty = w_xm1014_isempty
};

View File

@ -28,6 +28,18 @@
* to other weapons.
*/
weapontype_t
csweapon_ranged_type(void)
{
return WPNTYPE_RANGED;
}
weapontype_t
csweapon_melee_type(void)
{
return WPNTYPE_CLOSE;
}
/* called whenever a cstrike gun fires a successful shot */
void
Cstrike_ShotMultiplierAdd(player pl, int shots)