View Issue Details

IDProjectCategoryView StatusLast Update
0004961Spring engineGeneralpublic2015-09-25 02:56
Reporterjamerlan Assigned TojK  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version100.0 
Summary0004961: collideFriendly is broken?
DescriptionPlease take a look at this short video (starting from 1 min):
https://www.youtube.com/watch?v=u4tNg7pNkCc&feature=youtu.be&t=1m

Arm Sniper (armsnipe) have a weapon with: "collideFriendly = false" but it still kills ally units VERY often!
http://imolarpg.dyndns.org/trac/balatest/browser/trunk/units/armsnipe.lua#L107
Steps To Reproducedemo file is attached
TagsNo tags attached.
Attached Files
20150920_231114_neurope_a7_100.sdf (Attachment missing)
Checked infolog.txt for Errors

Activities

jamerlan

2015-09-20 22:33

reporter   ~0015198

tried to add "impactOnly = true," - still killing each other

jamerlan

2015-09-20 23:04

reporter   ~0015199

also I tried "noFriendlyCollide = false" and "noFriendlyCollide = true" with impactOnly and without....

To test just use:

/cheat
/give aafus
/give 100 armsnipe

and give some shoot orders on the ground

jamerlan

2015-09-20 23:47

reporter   ~0015200

And this lua code:
Spring.Echo("avoidFriendly", WeaponDefNames["armsnipe_armsnipe_weapon"].avoidFriendly)
Spring.Echo("noFriendlyCollide", WeaponDefNames["armsnipe_armsnipe_weapon"].noFriendlyCollide)

prints:
[f=0000137] avoidFriendly, true
[f=0000137] noFriendlyCollide, true

jamerlan

2015-09-21 00:14

reporter   ~0015201

the main reason for this bug report is "avoidFriendly" is not working good. Units are shooting each other very often

jK

2015-09-21 03:31

developer   ~0015202

| the main reason for this bug report is "avoidFriendly" is not working good. Units are shooting each other very often

that's the unitscript's fault not the engine's

jK

2015-09-21 03:34

developer   ~0015203

@not working collideFriendly
it's cause you use legacy Rifle weapontype

jamerlan

2015-09-21 07:57

reporter   ~0015204

"it's cause you use legacy Rifle weapontype "
could you please tell me how to fix it? Is there a modern replacement?

"that's the unitscript's fault not the engine's"
What is wrong with current script? How can I fix it?

I have "friendly fire" issues for many types of units. For example, for this unit too: arm t2 rocket spider (armsptk). When you have a group of these units and they are on the hill or downhill - they shoot each other with rockets (even with collideFriendly = false, I tested) http://imolarpg.dyndns.org/trac/balatest/browser/trunk/units/armsptk.lua

jK

2015-09-21 22:06

developer   ~0015207

Last edited: 2015-09-21 22:06

| What is wrong with current script? How can I fix it?

all aiming is done from AimFromWeapon


| could you please tell me how to fix it? Is there a modern replacement?

Cannon?

jK

2015-09-25 02:56

developer   ~0015240

seems solved?

Issue History

Date Modified Username Field Change
2015-09-20 22:21 jamerlan New Issue
2015-09-20 22:21 jamerlan File Added: 20150920_231114_neurope_a7_100.sdf
2015-09-20 22:33 jamerlan Note Added: 0015198
2015-09-20 23:04 jamerlan Note Added: 0015199
2015-09-20 23:47 jamerlan Note Added: 0015200
2015-09-21 00:14 jamerlan Note Added: 0015201
2015-09-21 03:31 jK Note Added: 0015202
2015-09-21 03:34 jK Note Added: 0015203
2015-09-21 07:57 jamerlan Note Added: 0015204
2015-09-21 22:06 jK Note Added: 0015207
2015-09-21 22:06 jK Note Edited: 0015207
2015-09-25 02:56 jK Note Added: 0015240
2015-09-25 02:56 jK Status new => closed
2015-09-25 02:56 jK Assigned To => jK
2015-09-25 02:56 jK Resolution open => fixed