Problem with daynight patch
by Kevin Johnson · in Torque Game Engine · 03/08/2004 (11:23 am) · 5 replies
What am i doing wrong?
patching file 'engine/game/game.cc'
Hunk #1 succeeded at 617 with fuzz 2 (offset 56 lines).
patching file 'engine/game/shapeBase.cc'
Hunk #1 succeeded at 28 (offset -2 lines).
Hunk #2 FAILED at 2496.
1 out of 2 hunks FAILED -- saving rejects to engine/game/shapeBase.cc.rej
patching file 'engine/game/fx/fxFoliageReplicator.cc'
Hunk #1 succeeded at 8 (offset -1 lines).
Hunk #3 succeeded at 1285 (offset 1 line).
Hunk #5 succeeded at 1663 (offset 1 line).
patching file 'engine/game/fx/fxSunLight.cc'
Hunk #1 succeeded at 17 (offset -1 lines).
Hunk #2 succeeded at 72 (offset 3 lines).
Hunk #3 succeeded at 1886 (offset -153 lines).
Hunk #4 succeeded at 2241 (offset 3 lines).
patching file 'engine/interior/interiorLMManager.cc'
Hunk #1 succeeded at 354 (offset -8 lines).
patching file 'engine/interior/interiorRender.cc'
Hunk #1 succeeded at 20 (offset -2 lines).
Hunk #3 succeeded at 979 (offset -2 lines).
Hunk #5 succeeded at 1099 (offset -2 lines).
Hunk #7 succeeded at 1182 (offset -2 lines).
patching file 'engine/sceneGraph/sceneLighting.cc'
Hunk #1 succeeded at 16 with fuzz 1 (offset -2 lines).
patching file 'engine/terrain/fluidRender.cc'
Hunk #1 succeeded at 10 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 167 with fuzz 1 (offset 13 lines).
Hunk #4 succeeded at 313 (offset 14 lines).
Hunk #5 succeeded at 305 with fuzz 2 (offset -2 lines).
Hunk #6 succeeded at 434 (offset 15 lines).
Hunk #7 succeeded at 428 with fuzz 2 (offset -3 lines).
Hunk #8 succeeded at 772 (offset 93 lines).
patching file 'engine/terrain/sky.cc'
Hunk #1 succeeded at 17 (offset -2 lines).
Hunk #2 succeeded at 175 (offset 7 lines).
Hunk #3 succeeded at 188 (offset -2 lines).
Hunk #4 succeeded at 607 (offset 3 lines).
Hunk #5 succeeded at 878 (offset 3 lines).
Hunk #6 succeeded at 886 (offset 3 lines).
Hunk #7 succeeded at 913 (offset 3 lines).
Hunk #8 succeeded at 976 (offset 3 lines).
Hunk #9 succeeded at 999 (offset 3 lines).
Hunk #10 succeeded at 1027 (offset 3 lines).
Hunk #11 succeeded at 1049 (offset 3 lines).
Hunk #12 succeeded at 1444 (offset 4 lines).
Hunk #13 succeeded at 1483 (offset 3 lines).
patching file 'engine/terrain/sun.cc'
Hunk #1 succeeded at 12 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 36 with fuzz 1 (offset 3 lines).
Hunk #3 succeeded at 55 (offset -2 lines).
patching file 'engine/terrain/sun.h'
Hunk #1 succeeded at 21 (offset -2 lines).
patching file 'engine/terrain/terrRender.cc'
Hunk #1 succeeded at 20 (offset -2 lines).
Hunk #2 succeeded at 2342 (offset 257 lines).
can't find file to patch at input line 1060
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: example/rw/data/missions/stronghold.mis
|===================================================================
|RCS file: /cvs/torque/torque/example/rw/data/missions/stronghold.mis,v
|retrieving revision 1.2
|diff -u -r1.2 stronghold.mis
|--- example/rw/data/missions/stronghold.mis 2002/11/23 15:33:11 1.2
|+++ example/rw/data/missions/stronghold.mis 2002/12/06 00:04:48
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
4 out of 4 hunks ignored
patching file 'engine/game/game.cc'
Hunk #1 succeeded at 617 with fuzz 2 (offset 56 lines).
patching file 'engine/game/shapeBase.cc'
Hunk #1 succeeded at 28 (offset -2 lines).
Hunk #2 FAILED at 2496.
1 out of 2 hunks FAILED -- saving rejects to engine/game/shapeBase.cc.rej
patching file 'engine/game/fx/fxFoliageReplicator.cc'
Hunk #1 succeeded at 8 (offset -1 lines).
Hunk #3 succeeded at 1285 (offset 1 line).
Hunk #5 succeeded at 1663 (offset 1 line).
patching file 'engine/game/fx/fxSunLight.cc'
Hunk #1 succeeded at 17 (offset -1 lines).
Hunk #2 succeeded at 72 (offset 3 lines).
Hunk #3 succeeded at 1886 (offset -153 lines).
Hunk #4 succeeded at 2241 (offset 3 lines).
patching file 'engine/interior/interiorLMManager.cc'
Hunk #1 succeeded at 354 (offset -8 lines).
patching file 'engine/interior/interiorRender.cc'
Hunk #1 succeeded at 20 (offset -2 lines).
Hunk #3 succeeded at 979 (offset -2 lines).
Hunk #5 succeeded at 1099 (offset -2 lines).
Hunk #7 succeeded at 1182 (offset -2 lines).
patching file 'engine/sceneGraph/sceneLighting.cc'
Hunk #1 succeeded at 16 with fuzz 1 (offset -2 lines).
patching file 'engine/terrain/fluidRender.cc'
Hunk #1 succeeded at 10 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 167 with fuzz 1 (offset 13 lines).
Hunk #4 succeeded at 313 (offset 14 lines).
Hunk #5 succeeded at 305 with fuzz 2 (offset -2 lines).
Hunk #6 succeeded at 434 (offset 15 lines).
Hunk #7 succeeded at 428 with fuzz 2 (offset -3 lines).
Hunk #8 succeeded at 772 (offset 93 lines).
patching file 'engine/terrain/sky.cc'
Hunk #1 succeeded at 17 (offset -2 lines).
Hunk #2 succeeded at 175 (offset 7 lines).
Hunk #3 succeeded at 188 (offset -2 lines).
Hunk #4 succeeded at 607 (offset 3 lines).
Hunk #5 succeeded at 878 (offset 3 lines).
Hunk #6 succeeded at 886 (offset 3 lines).
Hunk #7 succeeded at 913 (offset 3 lines).
Hunk #8 succeeded at 976 (offset 3 lines).
Hunk #9 succeeded at 999 (offset 3 lines).
Hunk #10 succeeded at 1027 (offset 3 lines).
Hunk #11 succeeded at 1049 (offset 3 lines).
Hunk #12 succeeded at 1444 (offset 4 lines).
Hunk #13 succeeded at 1483 (offset 3 lines).
patching file 'engine/terrain/sun.cc'
Hunk #1 succeeded at 12 with fuzz 2 (offset -2 lines).
Hunk #2 succeeded at 36 with fuzz 1 (offset 3 lines).
Hunk #3 succeeded at 55 (offset -2 lines).
patching file 'engine/terrain/sun.h'
Hunk #1 succeeded at 21 (offset -2 lines).
patching file 'engine/terrain/terrRender.cc'
Hunk #1 succeeded at 20 (offset -2 lines).
Hunk #2 succeeded at 2342 (offset 257 lines).
can't find file to patch at input line 1060
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: example/rw/data/missions/stronghold.mis
|===================================================================
|RCS file: /cvs/torque/torque/example/rw/data/missions/stronghold.mis,v
|retrieving revision 1.2
|diff -u -r1.2 stronghold.mis
|--- example/rw/data/missions/stronghold.mis 2002/11/23 15:33:11 1.2
|+++ example/rw/data/missions/stronghold.mis 2002/12/06 00:04:48
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
4 out of 4 hunks ignored
#2
http://www.actionrpg.com/twiki/bin/view.cgi/Main/TorqueDayNight
I am using the head do i need to apply this to the official version?
03/08/2004 (12:30 pm)
From :http://www.actionrpg.com/twiki/bin/view.cgi/Main/TorqueDayNight
I am using the head do i need to apply this to the official version?
#3
I've found that often I'm trying to apply patches to files that have already been altered by other code snippets.
The one hunk that failed in shapebase.cc is probably due to other code snippets you placed in there previous to the patch. The patch searches a few lines up and down from the location of an "untampered" file to place the new code. If the place it wants to go isn't found near the original location it fails.
You could manually insert the new code from the failed hunk by opening the patch in notepad and copy-paste the hunk into shapebase.cc in the proper location. You'll see in the patch file the new code is pre-empted with a + sign(if I remember right) between the existing code before and after it. The location would be somewhere around line 2496 as commented in the command prompt readout you pasted above.
The other failures were because you dont have a stronghold mission file in your mission folder. Place a stronghold in there or since you have the patch open in notepad you could copy and paste the info into whatever mission your using to test the code.
Just fixing the shapebase.cc by including the missing hunk of code should let you compile.
run the patch again and leave the command prompt window open for reference and then open the patch in notepad you'll see the mechanics of it.
03/08/2004 (1:40 pm)
I'm a modeler animator so I dont know how clear the following will be (or corect ): I've found that often I'm trying to apply patches to files that have already been altered by other code snippets.
The one hunk that failed in shapebase.cc is probably due to other code snippets you placed in there previous to the patch. The patch searches a few lines up and down from the location of an "untampered" file to place the new code. If the place it wants to go isn't found near the original location it fails.
You could manually insert the new code from the failed hunk by opening the patch in notepad and copy-paste the hunk into shapebase.cc in the proper location. You'll see in the patch file the new code is pre-empted with a + sign(if I remember right) between the existing code before and after it. The location would be somewhere around line 2496 as commented in the command prompt readout you pasted above.
The other failures were because you dont have a stronghold mission file in your mission folder. Place a stronghold in there or since you have the patch open in notepad you could copy and paste the info into whatever mission your using to test the code.
Just fixing the shapebase.cc by including the missing hunk of code should let you compile.
run the patch again and leave the command prompt window open for reference and then open the patch in notepad you'll see the mechanics of it.
#4
03/08/2004 (2:02 pm)
Thanx :)
#5
click here
appears to be "newer" than the link you provided. (feb 22 vs Mar 31, 2003) I found the patching to not work because of so many changes in the last year. I have been working through a manual patch myself. I had toyed with the idea of updating the patch file to be more recent. Not sure how many people that effort would help before my patch was broken also.
Let me know if you are going to update the patch so we don't repeat the effort.
03/08/2004 (2:34 pm)
The daylight resource here on GG click here
appears to be "newer" than the link you provided. (feb 22 vs Mar 31, 2003) I found the patching to not work because of so many changes in the last year. I have been working through a manual patch myself. I had toyed with the idea of updating the patch file to be more recent. Not sure how many people that effort would help before my patch was broken also.
Let me know if you are going to update the patch so we don't repeat the effort.
Torque Owner Gonzo T. Clown