/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
if ((bullet->owner == &player) || (bullet->owner == &engine.world) || (bullet->flags & ENT_BOSS))
{
- sprintf(comboString, "Combo-%s", bullet->name);
-
if (Collision::collision(enemy, bullet))
{
if (bullet->id != WP_LASER)
checkCombo();
}
+ snprintf(comboString, sizeof comboString, "Combo-%s", bullet->name);
checkObjectives(comboString, false);
checkObjectives("Enemy", false);
checkObjectives(enemy->name, false);
{
if (player.currentWeapon != &weapon[WP_LASER])
{
+ snprintf(comboString, sizeof comboString, "Combo-%s", bullet->name);
checkCombo();
checkObjectives(comboString, false);
}
if (game.currentComboHits >= 3)
{
char message[50];
- sprintf(message, _("%d Hit Combo!"), game.currentComboHits);
+ snprintf(message, sizeof message, _("%d Hit Combo!"), game.currentComboHits);
engine.setInfoMessage(message, 0, INFO_NORMAL);
}
{
for (int i = 0 ; i < MAX_ENEMIES ; i++)
{
- strcpy(defEnemy[i].name, "");
+ defEnemy[i].name[0] = 0;
}
int enemy = 0;