I'm not sure if this is the right place to ask this, but here goes. How does one fire a grenade? The code i have essentially calls SelectWeapon(WEAPON_COCKTAIL) (for some reason it doesn't work as WEAPON_GRENADE) and then Fires(), but instead of firing a grenade it just stands there. Also, is there a way to detect if u are up against the edge of the map? One more thing, why does GetObjectsInSight expect 5 parameters, while readme.txt only lists 4?
(Stolen from Programmer One)
UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus
[edited by - Dragon88 on August 8, 2003 7:45:01 PM]
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Defect Reports v0.2
quote: Original post by KhawkGood idea. I''ve put together some files for such a test. It still uses classes, but I''ve declared the member functions as __stdcall. Anyone want to test it?quote: Original post by smart_idiotIf you really want to figure it out, then try building an app in VC++ that loads a DLL built with mingw in a manner similar to GDArena.
I''m kind of sorry for asking for that, since I know it would be a lot of changes and introduced bugs, without even a guarentee that it would help the compatibility issue.
I think the arena is failing to call ReleaseBotInterface() when you close it (somewhat important for me because I want to write some information out to a file on shutdown).
John B
John B
Also, I think the taunt string is being delayed in both debug and release mode.
Edit: uh.. ignore this one, I hadn't tested enough. Looks like it is updating every frame as it should.
John B
[edited by - JohnBSmall on August 8, 2003 8:52:17 PM]
Edit: uh.. ignore this one, I hadn't tested enough. Looks like it is updating every frame as it should.
John B
[edited by - JohnBSmall on August 8, 2003 8:52:17 PM]
quote: Original post by Beer Hunterquote: Original post by KhawkGood idea. I've put together some files for such a test. It still uses classes, but I've declared the member functions as __stdcall. Anyone want to test it?quote: Original post by smart_idiotIf you really want to figure it out, then try building an app in VC++ that loads a DLL built with mingw in a manner similar to GDArena.
I'm kind of sorry for asking for that, since I know it would be a lot of changes and introduced bugs, without even a guarentee that it would help the compatibility issue.
Initial testing looks good. I downloaded DevC++ and built the DLL using it and MSVC. I then built the test app using MSVC and had it load both DLL's, without problem! I did have to change a few things though to get MSVC to stop complaining.
More extensive testing of an interface similar to that of GameDev: Arena is under way. Results will be posted once I have them.
Update code is as follows:
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ifoo.hpp#ifndef IFOO_HPP#define IFOO_HPP#define CONVENTION __stdcallclass IFoo {public: virtual int CONVENTION getNum() = 0; virtual void CONVENTION setNum(int blah) = 0;};#endif// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ifoo.cpp#include "ifoo.hpp"#include <windows.h>#include <new>class CFoo: public IFoo {public: int CONVENTION getNum() { return num; } void CONVENTION setNum(int blah) { num = blah; }private: int num;};extern "C"{ __declspec(dllexport) IFoo* CONVENTION createFoo() { return new (std::nothrow) CFoo; } __declspec(dllexport) void CONVENTION killFoo(IFoo* foo) { delete foo; }}BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved){ return TRUE;}
[edited by - slepyii on August 8, 2003 9:21:16 PM]
Ah, yeah. I''ve also downloaded those test files, and they seem to produce a working system (I haven''t tried any modifications)
John B
John B
Have you tried using mingw with the minor update of GDArena v0.2? It includes the __cdecl, but I was going to try the stdcall next if that didn''t work.
quote: Original post by Dragon88
I''m not sure if this is the right place to ask this, but here goes. How does one fire a grenade? The code i have essentially calls SelectWeapon(WEAPON_COCKTAIL) (for some reason it doesn''t work as WEAPON_GRENADE) and then Fires(), but instead of firing a grenade it just stands there.
For one, it sounds like you have the wrong version of the arena. WEAPON_GRENADE is in the latest 0.2 release. You have the sequence correct, though. I think the only thing you may be forgetting (or not knowing) is that when you select a grenade, you have a 2 second delay before it can actually fire - this means it will go through the Update() a few times before the grenade is actually thrown.
quote:
Also, is there a way to detect if u are up against the edge of the map? One more thing, why does GetObjectsInSight expect 5 parameters, while readme.txt only lists 4?
Yes and no. If you aren''t getting any objects returned from GetNumObjectsInSight, then chances are you are either in a corner or at the edge, although if you''re at an edge, you should get a return from GetObjectsInSight with one of the objects being a wall.
Also, if the readme.txt you have only shows 4 parameters for GetObjectsInSight, then you definitely don''t have the latest arena version. Make sure to check the sticky thread for the minor update of GDArena v0.2.
quote: Original post by KhawkIt''s working now. Thanks!
Have you tried using mingw with the minor update of GDArena v0.2? It includes the __cdecl, but I was going to try the stdcall next if that didn''t work.
quote:
All grenade randomness has been removed (velocity and yaw randomness). Grenades are thrown at a constant 4.0 units/second at the pitch angle specified by the programmer.
grenade velocity is 4.0 units/second? this seems rather slow when the walking speed is 20 units/second...
A headache, ancillary; an hourglass auxiliary.
"something witty, blah, blah, blah"
--That One Witty Guy (remember? that one dude?)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement