Skip to content

Commit 61adc37

Browse files
perimCyp
authored andcommitted
Fix cheat that allows you to gain experience through shooting at your own buildings or units.
(cherry picked from commit e181461)
1 parent 46c5b8e commit 61adc37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/projectile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ static void proj_UpdateKills(PROJECTILE *psObj, float experienceInc)
265265

266266
CHECK_PROJECTILE(psObj);
267267

268-
if ((psObj->psSource == NULL) ||
269-
((psObj->psDest != NULL) && (psObj->psDest->type == OBJ_FEATURE)))
268+
if (psObj->psSource == NULL || (psObj->psDest && psObj->psDest->type == OBJ_FEATURE)
269+
|| (psObj->psDest && psObj->psSource->player == psObj->psDest->player)) // no exp for friendly fire
270270
{
271271
return;
272272
}

0 commit comments

Comments
 (0)