The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action

It is currently 2014-09-03, 01:43

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2012-06-02, 03:37 
Offline

Joined: 2012-05-11, 00:28
Posts: 42
I've been having some trouble getting a new entity to actually work properly in a new map, so I've been following the tutorial at http://www.cafu.de/wiki/modding:addingnewdmentities trying to figure out what I'm missing. Didn't have any luck, so I thought I'd go back and follow it exactly, creating a duplicate Speaker2 object :P

Turns out, the code as presented doesn't compile anymore! I cheated and looked at the Speaker code that's actually distributed, and there's a missing struct in the header and a missing #include in the code file that I've found so far.

I just figured I'd go ahead and update the code in the walkthrough to match the code that's actually distributed, but I wanted to check first - is there any kind of review process? Or do we just update as we like, and let the history page sort it out? :)


Top
 Profile  
 
PostPosted: 2012-06-02, 11:16 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1950
Location: Germany
Hi Stoo,

thanks for looking into this! :up:

I'd be very happy if you updated the tutorial page with the current code. For each submitted change to a Wiki page, I receive an email with the diff that describes the change, so yes, there is (kind of) a review process built in.

Btw., there is no need to wait for any review feedback and no need to to worry about triggering too many emails, or making corrections multiply or later, I can easily deal with all that. In fact, I prefer several smaller changes over a single big one, especially when the smaller changes are "logically one unit each", where one logical unit is whatever you think is appropriate.

Feel free to make any changes as you desire!
Thanks in advance!
:wohow:

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2012-06-05, 01:14 
Offline

Joined: 2012-05-11, 00:28
Posts: 42
Well, it's just a few lines changed to reflect what's in the download version of the code files, but the changes are in.

I'm wondering if there's not one more step that's new since this was written, though; or if I'm just missing something again... I've added duplicate "Speaker2" code files that have the same contents as the Speaker.cpp and .hpp files, and a duplicate entry in the EntityClassDefs.lua; with all Speaker references converted to Speaker2. But, when I try to use it in a map, I'm getting:

Code:
Warning: No type info found for entity class "speaker2" with C++ class name "EntSpeaker2T".


Top
 Profile  
 
PostPosted: 2012-06-05, 23:32 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1950
Location: Germany
Stoo wrote:
Well, it's just a few lines changed to reflect what's in the download version of the code files, but the changes are in.

:thanks:

Quote:
I'm wondering if there's not one more step that's new since this was written, though; or if I'm just missing something again... I've added duplicate "Speaker2" code files that have the same contents as the Speaker.cpp and .hpp files, and a duplicate entry in the EntityClassDefs.lua; with all Speaker references converted to Speaker2. But, when I try to use it in a map, I'm getting:

Code:
Warning: No type info found for entity class "speaker2" with C++ class name "EntSpeaker2T".


In the .cpp source file, did you also change the string parameter to "EntSpeaker2T"?
Code:
const cf::TypeSys::TypeInfoT EntSpeaker2T::TypeInfo(GetBaseEntTIM(),
    "EntSpeaker2T",      //  <---- this one?
    "BaseEntityT", EntSpeaker2T::CreateInstance, MethodsList);

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2012-06-06, 05:16 
Offline

Joined: 2012-05-11, 00:28
Posts: 42
Yeah, I've got that one... copy-and-paste:

Code:
const cf::TypeSys::TypeInfoT EntSpeaker2T::TypeInfo(GetBaseEntTIM(), "EntSpeaker2T", "BaseEntityT", EntSpeaker2T::CreateInstance, MethodsList);


If I remember right, I just copied Speaker.cpp/hpp and did a find/replace on all the EntSpeakerT lines. I also went through and eyeballed everything, since they don't all quite match that string (#include Speaker2.hpp, etc).


Top
 Profile  
 
PostPosted: 2012-06-07, 00:08 
Offline

Joined: 2012-05-11, 00:28
Posts: 42
Ugh... figured out my issue... nothing to do with any of this, just didn't have my setup right.

:wallb:

But, now the walkthrough's slightly more current! :roll:


Top
 Profile  
 
PostPosted: 2012-06-07, 01:07 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1950
Location: Germany
Ahh... thanks for the update!

I was just trying to reproduce this (and couldn't) when I saw your message!
:cheesy: :up:

_________________
Best regards,
Carsten


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group