HLFX.Ru Forum
профиль •  правила •  регистрация •  календарь •  народ •  FAQ •  поиск •  новое •  сутки •  главная •  выход  
HLFX.Ru Forum HLFX.Ru Forum > Разработка игр > Наши проекты > XashXT > Added the vehicle code from CS but ...
  Предыдущая тема   Следующая тема
Автор
Тема Новая тема    Ответить
CRxTRDude
Dude extraordinare

Дата регистрации: Apr 2014
Проживает: (void)
Сообщений: 46
Возраст: 31

Рейтинг



Added the vehicle code from CS but ...

Following the advice of Ku2zoff, I grabbed the vehicle mechanic from the CS1.6 rev-eng dll source code. I have already fixed the save-restore mechanics and edited some of the stuff that I think needs editing. Now comes the part where I have to ask again. (I'm getting a little repetitive, am I?)

I compiled the thing hoping that the code is incorporated, but it looks like I missed something here:

code:
--------------------Configuration: server - Win32 Release-------------------- Compiling... multiplay_gamerules.cpp E:\Applications\Xash Source Code\Nikki\server\multiplay_gamerules.cpp(599) : error C2065: 'CFuncVehicle' : undeclared identifier E:\Applications\Xash Source Code\Nikki\server\multiplay_gamerules.cpp(599) : error C2059: syntax error : ')' player.cpp E:\Applications\Xash Source Code\Nikki\server\player.cpp(1516) : error C2065: 'pTrain' : undeclared identifier E:\Applications\Xash Source Code\Nikki\server\player.cpp(1516) : error C2227: left of '->Classify' must point to class/struct/union E:\Applications\Xash Source Code\Nikki\server\player.cpp(1517) : error C2065: 'CFuncVehicle' : undeclared identifier E:\Applications\Xash Source Code\Nikki\server\player.cpp(1517) : error C2059: syntax error : ')' E:\Applications\Xash Source Code\Nikki\server\player.cpp(1533) : error C2059: syntax error : ')' E:\Applications\Xash Source Code\Nikki\server\player.cpp(1978) : error C2059: syntax error : ')' E:\Applications\Xash Source Code\Nikki\server\player.cpp(1987) : error C2059: syntax error : ')' func_vehicle.cpp Generating Code... Error executing cl.exe. server.dll - 9 error(s), 0 warning(s)


Apparently the code couldn't find the entity, but as you can see also, func_vehicle.cpp (where the code for the entity is) compiled just fine.

I checked out the codes from the player cpp and multiplay rules cpp since I edited them as well to incorporate the vehicle cpp to the code. All are ripped directly from the player code of the CS dll source.

C++ Source Code:
CBasePlayer *pDriver = (CBasePlayer *)((CFuncVehicle *)ktmp)->m_pDriver;


I placed the source down here in hopes that someone would see where the problem stems from. I suspected that I missed something there during my editing.

BTW, the code originally had a header, but I merged it in the cpp file because it gave errors.

Вложение: vehicle codes.zip (13.0 кб)
Этот файл был скачан 381 раз.

__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)

Сообщить модератору | | IP: Записан
Сообщение: 137691

Старое сообщение 16-05-2014 02:25
- За что?
 XaeroX
Crystice Softworks

Дата регистрации: Oct 2005
Проживает: Торонто
Сообщений: 34498
Нанёс повреждений: 514 ед.
Возраст: 37

Рейтинг



Награды
 
[1 награда]


#include vehicle.h into multiplay_gamerules.cpp and player.cpp.

Добавлено 16-05-2014 в 13:01:

Цитата:
CRxTRDude писал:
but I merged it in the cpp

unmerge.

__________________
Правдой дорожить, лжи не потакать,
Дальних не судить, ближним помогать,
С тишиной сойтись на исходе дня
Научи меня, Родина моя!

Сообщить модератору | | IP: Записан
Сообщение: 137692

Старое сообщение 16-05-2014 06:01
-
CRxTRDude
Dude extraordinare

Дата регистрации: Apr 2014
Проживает: (void)
Сообщений: 46
Возраст: 31

Рейтинг



Okay, so I'll unmerge what was supposed to be from the header, then I'll place includes on all what I wanted to affect? I couldn't believe I would forget something like that. Sorry bout that. I'll be going ahead and put it then. I'll edit the post if it works or not.

__________________
CRxTRDude
-----------------------
Nikki Shore blog / XashXT Cookbook (CSM)

Сообщить модератору | | IP: Записан
Сообщение: 137693

Старое сообщение 16-05-2014 06:28
- За что?
 XaeroX
Crystice Softworks

Дата регистрации: Oct 2005
Проживает: Торонто
Сообщений: 34498
Нанёс повреждений: 514 ед.
Возраст: 37

Рейтинг



Награды
 
[1 награда]


Цитата:
CRxTRDude писал:
error C2065: 'CFuncVehicle' : undeclared identifier

You see? This means that these files are not aware of CFuncVehicle class. When you place an include at the beginning, the class definition becomes known to them, and this error will be fixed.

__________________
Правдой дорожить, лжи не потакать,
Дальних не судить, ближним помогать,
С тишиной сойтись на исходе дня
Научи меня, Родина моя!

Сообщить модератору | | IP: Записан
Сообщение: 137694

Старое сообщение 16-05-2014 06:57
-
CRxTRDude
Dude extraordinare

Дата регистрации: Apr 2014
Проживает: (void)
Сообщений: 46
Возраст: 31

Рейтинг



Tried the code out, didn't work unfortunately. The vehicle is there, the controls is there, but when I press use, there is no hud display, it didn't gain control, didn't work. I wonder why it didn't carry over?

I edited player.cpp appropriately, added now the header file from vehicle code.

Сообщить модератору | | IP: Записан
Сообщение: 137695

Старое сообщение 16-05-2014 08:37
- За что?
CRxTRDude
Dude extraordinare

Дата регистрации: Apr 2014
Проживает: (void)
Сообщений: 46
Возраст: 31

Рейтинг



I modified the vehicle code based on CFuncTrackTrain from plats.cpp. It compiled good along with all the declarations to player.cpp and the rest.

I tested it with a sample map for CS from TWHL, didn't work.

I have a copy of CS 1.3 that runs on the latest Xash3D engine, placed the CS vehicle map and worked.

I have a copy of my source code for anyone interested in helping. Thanks again.

Сообщить модератору | | IP: Записан
Сообщение: 137697

Старое сообщение 16-05-2014 14:37
- За что?
Тема: (Опционально)
Ваш ответ:



Переводчик транслита


[проверить длину сообщения]
Опции: Автоматическое формирование ссылок: автоматически добавлять [url] и [/url] вокруг интернет адресов.
Уведомление по E-Mail: отправить вам уведомление, если кто-то ответил в тему (только для зарегистрированных пользователей).
Отключить смайлики в сообщении: не преобразовывать текстовые смайлики в картинки.
Показать подпись: добавить вашу подпись в конец сообщения (только зарегистрированные пользователи могут иметь подписи).

Временная зона GMT. Текущее время 17:51. Новая тема    Ответить
  Предыдущая тема   Следующая тема
HLFX.Ru Forum HLFX.Ru Forum > Разработка игр > Наши проекты > XashXT > Added the vehicle code from CS but ...
Версия для печати | Отправить тему по E-Mail | Подписаться на эту тему

Быстрый переход:
Оцените эту тему:

Правила Форума:
Вы not можете создавать новые темы
Вы not можете отвечать в темы
Вы not можете прикреплять вложения
Вы not можете редактировать ваши сообщения
HTML Код ВЫКЛ
vB Код ВКЛ
Смайлики ВКЛ
[IMG] Код ВКЛ
 

< Обратная связь - HLFX.ru >

На основе vBulletin
Авторское право © 2000 - 2002, Jelsoft Enterprises Limited.
Дизайн и программирование: Crystice Softworks © 2005 - 2024