Closed dekrus closed 1 year ago
Some versions? Do you have a reproducible use case?
В фоллаут 1.5 на этом сейве можно глянуть. Любой extended или 5.0 сфалл. Просто кинуть гранату рядом с напарницей( не важно заденет взрывом или нет)
Также сейв на F2 FE 3.9.3 + ECCO.
На обычном F2 без ессо напарники не нападают на игрока.
OK, thanks for testing and suggestions.
When attacking an "empty" hex with a grenade, on some versions of sfall, companions within the "random(4, 6)" radius start attacking the player, even if they were not within the grenade's blast radius.
This part of the code causes this behavior: https://github.com/BGforgeNet/FO2tweaks/blob/1ea03bd878525c64f0731d2581a4803ce0994865/source/gl_g_grenades_anywhere.ssl#L101-L103
I propose to add a check if the object belongs to the player's group.
if object != dude_obj andAlso has_trait(TRAIT_OBJECT,object,OBJECT_TEAM_NUM) != TEAM_PLAYER then set_object_data(object, OBJ_DATA_WHO_HIT_ME, dude_obj);
orif object != dude_obj andAlso not(is_in_array(object,party_member_list(1))) then set_object_data(object, OBJ_DATA_WHO_HIT_ME, dude_obj);