Game Development Community

Applying pathInteriors patch

by Zach · in Torque Game Engine · 07/27/2004 (7:50 am) · 5 replies

Hi

Just a quick query. Trying to apply the pathInteriors patch to the latest Head, but the actual patch process doesn't appear to work.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4980

Followed instructions such as http://www.garagegames.com/docs/torque.sdk/gstarted/patches.html

When I type
patch -p0 engine\pathInterior.patch

from within c:\torque\torque\

which is where torque is situated, the command screen just sits there - forever..
Makefile and pathInterior.patch are in c:\torque\torque\engine\

Doesn't seem to matter where the files are, I get same result.

I've copied patch.exe in to c:\windows\system32\ and other places, and windows command line has got no problem finding it.

pathInterior.patch is in c:\torque\torque\engine

In fact if I just type 'patch' the same happens. The only patch command that works is 'patch --help'.

I'm using Visual Studio 7.0. Any ideas??

It's probably something really simple I'm missing, but I just can't see it!!

Thanks

Zach

#1
07/27/2004 (9:21 am)
Your patch command should be:

patch -p0 < engine\pathInterior.patch

The '<' is vital.

You might also want to use the newer version of this resource, found here. David Potter has brought the patch up to date to patch flawlessly with the latest head. It is identical in functionality to the old version, patched for me perfectly.

Luke
#2
07/27/2004 (10:26 am)
Thanks for that. Had a feeling it was something simple. Amazing what you miss!!

yes, I'm following that resource, but it needs the previous resource to start.

Just executed the patch, and it shows a few errors, hope that doesn't cause a problem.




C:\torque\torque>patch -p0 < engine\pathInterior.patch
patching file 'engine/game/main.cc'
patching file 'engine/game/objectTypes.h'
patching file 'engine/game/player.cc'
Hunk #3 FAILED at 447.
Hunk #11 FAILED at 2712.
Hunk #12 FAILED at 2752.
Hunk #16 FAILED at 2922.
Hunk #18 FAILED at 3264.
Hunk #19 succeeded at 3280 with fuzz 2.
5 out of 20 hunks FAILED -- saving rejects to engine/game/player.cc.rej
patching file 'engine/game/trigger.cc'
patching file 'engine/interior/interior.cc'
patching file 'engine/interior/interior.h'
patching file 'engine/interior/interiorDebug.cc'
patching file 'engine/interior/interiorIO.cc'
patching file 'engine/interior/interiorInstance.cc'
patching file 'engine/interior/interiorInstance.h'
patching file 'engine/interior/interiorRender.cc'
patching file 'engine/interior/interiorRes.cc'
patching file 'engine/interior/interiorResObjects.cc'
patching file 'engine/interior/pathedInterior.cc'
Hunk #2 FAILED at 16.
Hunk #3 FAILED at 325.
Hunk #4 FAILED at 572.
3 out of 4 hunks FAILED -- saving rejects to engine/interior/pathedInterior.cc.r
ej
patching file 'engine/interior/pathedInterior.h'
patching file 'engine/platformWin32/winMemory.cc'
patching file 'engine/platformWin32/winWindow.cc'
patching file 'engine/sceneGraph/sceneLighting.cc'
patching file 'engine/sim/pathManager.cc'
Hunk #1 succeeded at 189 (offset 7 lines).
Hunk #3 succeeded at 243 (offset 7 lines).
patching file 'engine/sim/pathManager.h'
patching file 'example/starter.fps/data/interiors/towers/landtower_0.map'
patching file 'example/starter.fps/data/missions/stronghold.mis'
patching file 'example/starter.fps/server/scripts/game.cs'
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to example/starter.fps/server/scripts/g
ame.cs.rej
patching file 'tools/map2dif/createLightmaps.cc'
patching file 'tools/map2dif/csgBrush.cc'
patching file 'tools/map2dif/csgBrush.h'
patching file 'tools/map2dif/editGeometry.cc'
patching file 'tools/map2dif/editGeometry.h'
patching file 'tools/map2dif/editInteriorRes.cc'
patching file 'tools/map2dif/entityTypes.cc'
patching file 'tools/map2dif/entityTypes.h'
patching file 'tools/map2dif/exportGeometry.cc'
patching file 'tools/map2dif/main.cc'
patching file 'tools/map2dif/morianBasics.h'
patching file 'tools/map2dif/tokenizer.cc'
patching file 'tools/map2dif/tokenizer.h'
patching file 'tools/map2dif/torque.fgd'

C:\torque\torque>



Hunk Failed??
#3
07/27/2004 (10:33 am)
Just compiled it, and loads more errors...
This is just a sample..

c:\torque\torque\engine\interior\pathedInterior.cc(25) : error C2065: 'sound' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(25) : error C2109: subscript requires array or pointer type
c:\torque\torque\engine\interior\pathedInterior.h(21) : see declaration of 'PathedInteriorData'
c:\torque\torque\engine\interior\pathedInterior.cc(412) : error C2065: 'mCurrentPosition' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(412) : error C2065: 'mTargetPosition' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(414) : error C2065: 'mExtrudedBox' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(414) : error C2065: 'getWorldBox' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(613) : error C2440: '=' : cannot convert from ''unknown-type'' to 'S32'
c:\torque\torque\engine\interior\pathedInterior.cc(614) : error C2248: 'PathedInterior::mPathIndex' : cannot access protected member declared in class 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.h(75) : see declaration of 'PathedInterior::mPathIndex'
c:\torque\torque\engine\interior\pathedInterior.cc(614) : error C2440: '=' : cannot convert from ''unknown-type'' to 'S32'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2248: 'PathedInterior::mOffset' : cannot access protected member declared in class 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.h(78) : see declaration of 'PathedInterior::mOffset'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2440: '=' : cannot convert from ''unknown-type'' to 'Point3F'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2100: illegal indirection


c:\torque\torque\engine\interior\pathedInterior.cc(25) : error C2065: 'sound' : undeclared identifier
c:\torque\torque\engine\interior\pathedInterior.cc(25) : error C2109: subscript requires array or pointer type
c:\torque\torque\engine\interior\pathedInterior.cc(30) : error C2039: 'sound' : is not a member of 'PathedInteriorData'
c:\torque\torque\engine\interior\pathedInterior.h(21) : see declaration of 'PathedInteriorData'
c:\torque\torque\engine\interior\pathedInterior.cc(31) : error C2039: 'sound' : is not a member of 'PathedInteriorData'

c:\torque\torque\engine\interior\pathedInterior.h(48) : see declaration of 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.cc(613) : error C2440: '=' : cannot convert from ''unknown-type'' to 'S32'
c:\torque\torque\engine\interior\pathedInterior.cc(614) : error C2248: 'PathedInterior::mPathIndex' : cannot access protected member declared in class 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.h(75) : see declaration of 'PathedInterior::mPathIndex'
c:\torque\torque\engine\interior\pathedInterior.cc(614) : error C2440: '=' : cannot convert from ''unknown-type'' to 'S32'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2248: 'PathedInterior::mOffset' : cannot access protected member declared in class 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.h(78) : see declaration of 'PathedInterior::mOffset'
c:\torque\torque\engine\interior\pathedInterior.h(48) : see declaration of 'PathedInterior'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2440: '=' : cannot convert from ''unknown-type'' to 'Point3F'
c:\torque\torque\engine\interior\pathedInterior.cc(615) : error C2100: illegal indirection

I can see on the resource, there are similar errors showing from other members. Oh well!

I'm tired and had enough for today. I'll try again tomorrow. If anyone has been through this and has a simple answer, please let me know.

Thanks to Luke for the previous answer!!

Zach
#4
07/27/2004 (10:45 am)
Apologies for the multiple postings, but just going over the new patch, and I've found the newer download. My skim reading has let me down. I've applied the older patch which has caused all the errors. If I try the new patch now, it finds a previously applied patch and skips the new patch.

Any idea on the best way forward?

Force the patch? Regrab the original source files, wbhich I assume I can do using CVS? Another solution?

Thanks for your patience!!

Zach
#5
07/27/2004 (11:03 am)
Personally I'd grab a fresh copy of the source. You could potentially rewind the patch by hand (there may even be an automated way to do it, but I'm not aware of such) but fetching the source again is a guaranteed clean solution.

After having grabbed the source a few times to reverse a coding/patching blunder myself, I now wisely keep a pristene copy on CD-ROM or in another directory at all times. :)


Luke