MantisBT - Soldat Dedicated Server
View Issue Details
0000356Soldat Dedicated ServerScripting Corepublic2013-07-30 13:012014-08-17 18:52
Mighty 
ExHunter 
normalminoralways
resolvedfixed 
x86WindowsXP SP3
2.7.4 
 
0000356: Script Core 3 - TPLayer.OnKill - WeaponType is unpredictable
Tested offline with bots (Boogie Man)

WeaponType value is completely unpredictable. Most of the time its value equals 1, regardless of the weapon. It's also not consistant, when using Rambo Bow I encountered WeaponType with values of 1,2 and 7 IIRC
Use this script

procedure OnKillID(Killer, Victim: TActivePlayer; WeaponType: Byte);
begin
  Killer.Tell('Kill --> ['+inttostr(WeaponType)+']');
  Victim.Tell('Kill --> ['+inttostr(WeaponType)+']');
end;

var
  i: Byte;
begin
  for i:=1 to 32 do
    Players[i].OnKill := @OnKillID;

end.
No tags attached.
Issue History
2013-07-30 13:01MightyNew Issue
2013-07-31 02:33FalconAssigned To => Falcon
2013-07-31 02:33FalconStatusnew => acknowledged
2013-08-02 21:31FalconStatusacknowledged => resolved
2013-08-02 21:31FalconResolutionopen => fixed
2013-08-09 12:42MightyNote Added: 0001847
2013-08-09 12:42MightyStatusresolved => feedback
2013-08-09 12:42MightyResolutionfixed => reopened
2013-08-10 01:08FalconNote Added: 0001849
2013-08-10 01:08FalconStatusfeedback => confirmed
2013-12-27 23:36FalconAssigned ToFalcon =>
2014-05-09 14:06ExHunterNote Added: 0002260
2014-08-15 01:16ExHunterNote Added: 0002263
2014-08-15 01:16ExHunterAssigned To => ExHunter
2014-08-15 01:16ExHunterStatusconfirmed => feedback
2014-08-17 18:52ExHunterNote Added: 0002269
2014-08-17 18:52ExHunterStatusfeedback => resolved
2014-08-17 18:52ExHunterResolutionreopened => fixed

Notes
(0001847)
Mighty   
2013-08-09 12:42   
Still present in 1.6.5
Same thing happens with TPlayer.OnDamage

I think OnDamage causes OnKill issues, since even though OnDamage is very inconsistant, the last OnDamage WeaponType (before death) is always equal to OnKill WeaponType.

Code here: http://pastebin.com/9EN4YmHi [^]
(0001849)
Falcon   
2013-08-10 01:08   
Although in case of SC3 "it's not a bug, it's a feature", in SC2 it's indeed broken.
(0002260)
ExHunter   
2014-05-09 14:06   
Is it still present? Skoskav made some changes (fixes), which could be related to the issue.
(0002263)
ExHunter   
2014-08-15 01:16   
Anyone can still confirm this?
(0002269)
ExHunter   
2014-08-17 18:52   
fixed for next version