Anonymous Login
2018-07-19 03:59 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001983OpenClonkObjectspublic2018-03-21 06:40
ReporterLuchs 
Assigned ToCaesar 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target Version8.0Fixed in Version 
Summary0001983: Arrows do not burn in lava
DescriptionThey really should.
TagsNo tags attached.
Attached Files
  • patch file icon 0001-Better-burned-graphics-for-arrows.patch (2,338 bytes) 2018-01-28 11:56 -
    From d27d708742138c2f120e02098136aa76b1f08a9c Mon Sep 17 00:00:00 2001
    From: Julius Michaelis <gitter@liftm.de>
    Date: Sun, 28 Jan 2018 12:51:51 +0100
    Subject: [PATCH] Better burned graphics for arrows
    
    ---
     .../Items.ocd/Weapons.ocd/Bow.ocd/Arrow.ocd/Script.c  | 19 +++++++++++++++----
     .../Objects.ocd/Libraries.ocd/Flammable.ocd/Script.c  |  3 ++-
     2 files changed, 17 insertions(+), 5 deletions(-)
    
    diff --git a/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Arrow.ocd/Script.c b/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Arrow.ocd/Script.c
    index 21a972ed2..768e0b5bb 100644
    --- a/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Arrow.ocd/Script.c
    +++ b/planet/Objects.ocd/Items.ocd/Weapons.ocd/Bow.ocd/Arrow.ocd/Script.c
    @@ -131,14 +131,19 @@ public func FxInFlightTimer(object target, proplist effect, int time)
     	return 1;
     }
     
    -protected func UpdatePicture()
    +private func GetGfxNameStr()
     {
     	var arrow_count = GetStackCount();
     	if (arrow_count >= 9) 
    -		SetGraphics(nil);
    +		return nil;
     	else 
    -		SetGraphics(Format("%d", arrow_count));
    -	_inherited(...);
    +		return Format("%d", arrow_count);
    +}
    +
    +protected func UpdatePicture()
    +{
    +	SetGraphics(GetGfxNameStr());
    +	return _inherited(...);
     }
     
     protected func Entrance()
    @@ -155,6 +160,12 @@ protected func RejectEntrance()
     	return _inherited(...);
     }
     
    +protected func CustomizeBurnedObject(object burned)
    +{
    +	burned->SetGraphics(GetGfxNameStr(), Arrow);
    +	burned->SetClrModulation(RGB(127,127,127));
    +}
    +
     public func IsArrow() { return true; }
     public func MaxStackCount() { return 15; }
     public func ArrowStrength() { return 10; }
    diff --git a/planet/Objects.ocd/Libraries.ocd/Flammable.ocd/Script.c b/planet/Objects.ocd/Libraries.ocd/Flammable.ocd/Script.c
    index 9e64dd26b..eaf096629 100644
    --- a/planet/Objects.ocd/Libraries.ocd/Flammable.ocd/Script.c
    +++ b/planet/Objects.ocd/Libraries.ocd/Flammable.ocd/Script.c
    @@ -63,6 +63,7 @@ public func BurnDown(int caused_by)
     	var container = Contained();
     	burned->SetR(GetR());
     	burned->Incinerate(100, caused_by);
    +	this->~CustomizeBurnedObject(burned);
     	RemoveObject(true);
     	if (container)
     		burned->Enter(container);
    @@ -77,4 +78,4 @@ public func GetInventoryIconOverlay() // Display a flame in the inventory bar
     		Symbol = Icon_Flame
     	};
     	return overlay;
    -}
    \ No newline at end of file
    +}
    -- 
    2.16.1
    
    
    patch file icon 0001-Better-burned-graphics-for-arrows.patch (2,338 bytes) 2018-01-28 11:56 +

-Relationships
related to 0002020new The burned object does not fit well with many of the burnable objects 
+Relationships

-Notes

~0006092

Maikel (developer)

What should fire arrows and explosive arrows do? Burn to ashes and explode respectively?

~0006097

Caesar (developer)

Fire arrows shouldn't do anything different from normal arrows. I'm leaning towards explosive arrows exploding, but maybe only after some delay…

~0006102

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/f39ce4f25c11bb13c84406b26a8859a9997cf41e

Changeset f39ce4f by Julius Michaelis <gitter@liftm.de>
Make arrows burn (0001983)

~0006103

Caesar (developer)

Sadly, the burned objects look ugly for arrows. The attached patch makes that somewhat better, but the bow has the same problem, so I don't want to touch that right now.
+Notes

-Issue History
Date Modified Username Field Change
2018-01-18 19:59 Luchs New Issue
2018-01-23 08:38 Maikel Note Added: 0006092
2018-01-24 21:36 Caesar Note Added: 0006097
2018-01-28 11:54 occ Note Added: 0006102
2018-01-28 11:56 Caesar File Added: 0001-Better-burned-graphics-for-arrows.patch
2018-01-28 11:56 Caesar Note Added: 0006103
2018-01-28 11:56 Caesar Assigned To => Caesar
2018-01-28 11:56 Caesar Status new => resolved
2018-01-28 11:56 Caesar Resolution open => fixed
2018-03-21 06:40 Caesar Relationship added related to 0002020
+Issue History